[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] File size problem in the status bar
From: |
Liu Hao |
Subject: |
[Nano-devel] File size problem in the status bar |
Date: |
Fri, 20 Jul 2018 22:48:50 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Dear developers,
I am using nano from Git master @ c46696d40c. I have found two minor
issues about the file size in bytes field in the status bar. Please check.
1) With auto indent turned on, on a line with two-TAB indention for
example, when I press Enter, nano inserts a new line with two TAB
characters in the front, so the file size gets increased by 3. This is
the correct behavior. However, if I undo this operation using Alt-U, the
new line is deleted and the file size is only decreased by 1, so the
size displayed will be larger than the actual size by 2.
Expected behavior: The file size should revert to its old value before
pressing the Enter key.
2) I intermittently get garbage file size values on the status bar. I
don't know how to reproduce this. Eventually I had Valgrind attached to
nano and it caught use of an uninitialized value in winio.c on the
following line:
```
charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize;
```
, where `openfile->totsize` seemed uninitialized, as `sum` looked
normal. I have had Valgrind log attached. Hope it helps.
--
Best regards,
LH_Mouse
vg.log
Description: Text Data
- [Nano-devel] File size problem in the status bar,
Liu Hao <=
- Re: [Nano-devel] File size problem in the status bar, Benno Schulenberg, 2018/07/21
- Re: [Nano-devel] File size problem in the status bar, Liu Hao, 2018/07/21
- Re: [Nano-devel] File size problem in the status bar, Benno Schulenberg, 2018/07/22
- Re: [Nano-devel] File size problem in the status bar, Liu Hao, 2018/07/22
- Re: [Nano-devel] File size problem in the status bar, Benno Schulenberg, 2018/07/22
- Re: [Nano-devel] File size problem in the status bar, Liu Hao, 2018/07/22
- Re: [Nano-devel] File size problem in the status bar, Liu Hao, 2018/07/22
- Re: [Nano-devel] File size problem in the status bar, Benno Schulenberg, 2018/07/23
- Re: [Nano-devel] File size problem in the status bar, Benno Schulenberg, 2018/07/23