bugGNU nano - Bugs: bug #54639, "col 35/35 (100%), char 72/73...


You are not allowed to post comments on this tracker with your current authentication level.

bug #54639: "col 35/35 (100%), char 72/73 (98%)" left on bottom row after exit

Submitted by:  Lauri Kasanen <cand>
Submitted on:  Mon 10 Sep 2018 08:39:09 AM UTC
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Wed 19 Sep 2018 07:20:25 PM UTC, comment #9: 

Released in 3.1.

Benno Schulenberg <bens>
Project Administrator
Thu 13 Sep 2018 05:59:21 PM UTC, comment #8: 

Thanks for confirming.  And thanks again for reporting!

Pushed to master, commit eaeafe29.  Will be in 3.1 in a week or two.

Benno Schulenberg <bens>
Project Administrator
Thu 13 Sep 2018 12:15:35 PM UTC, comment #7: 

The patch on top of 3.0 seems to work so far.

Lauri Kasanen <cand>
Wed 12 Sep 2018 03:31:07 PM UTC, comment #6: 

After some quick testing, your patch works for both my test cases.  Thanks.

David Lawrence Ramsey <dolorous>
Project Member
Wed 12 Sep 2018 02:00:53 PM UTC, comment #5: 

What happens is that the cursor-position message gets written to the screen before nano has re-entered curses mode -- the suspend keystroke elicits a call to do_cursorpos(), but it gets executed only upon returning from suspension.  You can see this happening when you add a napms(3000) (a three-second sleep) at the end of do_cursorpos().

The solution is simple: the suspend keystroke should suppress the writing of the cursor position.  Please try the attached patch.

Or do you see this spurious cursor-position display also when not using suspension, Lauri?

(file #44991)

Benno Schulenberg <bens>
Project Administrator
Tue 11 Sep 2018 06:33:36 PM UTC, comment #4: 

Thanks David, I can now reproduce.

The problem has been there for a while: at least since 2.4.3 -- version 2.3.6 was still unaffected.

Bisecting points at 75d64e67 as the offending commit.  Hmmm...  Strange.  I don't see what a SIGWINCH has to do with exiting from curses mode.  :|

Benno Schulenberg <bens>
Project Administrator
Tue 11 Sep 2018 07:29:36 AM UTC, comment #3: 

Yes, I have "set nohelp" in my nanorc, but I couldn't make the help text stay on screen after exit. Following David's steps reproduces for me, even if I drop "--nohelp" from the first command.

Lauri Kasanen <cand>
Tue 11 Sep 2018 01:09:40 AM UTC, comment #2: 

I've been seeing this as well.  I can reproduce it as follows with nano 3.0:

1. Run: nano -I --suspend --constantshow --nohelp

2. Press Ctrl-Z to suspend nano.

3. Type "fg" and Enter at the prompt to go back into nano.

4. Press Ctrl-X to exit nano.

nano's cursor position display is still displayed after exiting, and it overwrites the prompt on my system, so I end up with:

dramsey@serenity:~$ █ 1/1 (100%), char 0/0 (0%)

just as in Lauri's case.  (The block is to show where my cursor is; nano doesn't actually display it.).

If in step 1, I run:

nano -I --suspend --constantshow

instead, I still get the same problem; the help lines are not left behind, only the cursor position display.

David Lawrence Ramsey <dolorous>
Project Member
Mon 10 Sep 2018 05:43:22 PM UTC, comment #1: 

Hello Lauri,

Thanks for reporting.

Besides 'set constantshow' you also use 'set nohelp' in your nanorc?  Because it looks to me that nano somehow fails to clear the bottom row of the screen before giving back control to the shell (which then proceeds to write the prompt on that bottom row, probably overwriting the "line 2/18 (0%)" part, or something similar).

If you do use 'set nohelp', then please comment it out and see if ^X then leaves the bottom help line on the screen, or maybe even both of them.

Benno Schulenberg <bens>
Project Administrator
Mon 10 Sep 2018 08:39:09 AM UTC, original submission:  

I updated to the new 3.0 release from 2.2.6. When I exit by ctrl-x, sometimes there's output on the console:

user@/tmp$  col 35/35 (100%), char 72/73 (98%)

I have "set constantshow" in my nanorc, what used to be "set const".

$ nano --version
 GNU nano, version 3.0
 (C) 1999-2011, 2013-2018 Free Software Foundation, Inc.
 (C) 2014-2018 the contributors to nano
 Email: -email is unavailable-    Web: https://nano-editor.org/
 Compiled options: --disable-speller --disable-nls --disable-utf8

Lauri Kasanen <cand>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dolorous (Posted a comment)
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by cand (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-19 bens Open/ClosedOpen => Closed
    2018-09-13 bens StatusIn Progress => Fixed
    2018-09-12 bens Attached File- => Added suppress-constantshow-when-suspending.patch, #44991
        StatusNone => In Progress
        Assigned toNone => bens
    2018-09-11 bens Summary"col 35/35 (100%), char 72/73 (98%)" on console after exit => "col 35/35 (100%), char 72/73 (98%)" left on bottom row after exit

    Back to the top

    Powered by Savane 3.9