[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] state flag related modifications
From: |
Benno Schulenberg |
Subject: |
Re: [PATCH] state flag related modifications |
Date: |
Mon, 21 Dec 2020 15:16:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Op 21-12-2020 om 07:16 schreef ObeliX:
> [...] thus wmove() returned an error and did not
> change the cursor position, causing that state info was directly
> appended to path.
Ouch. That is a serious display bug. I've re-reported it here:
https://savannah.gnu.org/bugs/?59744
(Please in future report any issue on Savannah. That's where
bug reports go.)
> the minimalistic fix is, to print the state info only, when
> stateflag string was initialized to a size bigger than 2.
> because in browser mode statelen is 2 or 0 (depending if
> right border spaces are included or not).
Or simply check that 'state' is not an empty string.
> --- a/src/winio.c
> +++ b/src/winio.c
> @@ -2007,7 +2007,7 @@ void titlebar(const char *path)
> if (ISSET(STATEFLAGS) && !ISSET(VIEW_MODE)) {
> if (openfile->modified && COLS > 1)
> waddstr(topwin, " *");
> - if (statelen < COLS) {
> + if (statelen > 2 && statelen < COLS) {
The check needs to happen earlier, because also the asterisk
needs to be suppressed in the file browser and help viewer.
I've applied this fix:
https://git.savannah.gnu.org/cgit/nano.git/commit/?id=5c4c30e2
Thanks for (indirectly) reporting the bug, plus the proposed fix.
(I'm amazed that no one else had reported this yet -- apparently
very few people use the browser or help.)
Benno
signature.asc
Description: OpenPGP digital signature
- [PATCH] state flag related modifications, ObeliX, 2020/12/21
- Re: [PATCH] state flag related modifications,
Benno Schulenberg <=
- Re: [PATCH] state flag related modifications, Benno Schulenberg, 2020/12/21
- Re: [PATCH] state flag related modifications, Benno Schulenberg, 2020/12/21
- Re: [PATCH] state flag related modifications, Benno Schulenberg, 2020/12/21
- Re: [PATCH] state flag related modifications - TAB key status, ObeliX, 2020/12/23
- Re: [PATCH] state flag related modifications - TAB key status, pepa65, 2020/12/23
- Re: [PATCH] state flag related modifications - TAB key status, Benno Schulenberg, 2020/12/24
- Re: [PATCH] state flag related modifications - TAB key status, ObeliX, 2020/12/26
- Re: how to represent the TAB key status, Benno Schulenberg, 2020/12/27
- Re: how to represent the TAB key status, ObeliX, 2020/12/28
- Re: how to represent the TAB key status, Benno Schulenberg, 2020/12/28