bugGNU nano - Bugs: bug #61081, with 'set linenumbers', the...

 
 

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

bug #61081: with 'set linenumbers', the display is garbled in version 3.1

Submitter:  Adam <slideelectric>
Submitted:  Wed 25 Aug 2021 02:44:08 PM UTC
   
 
Severity:  3 - Normal Status:  Invalid
Assigned to:  None Open/Closed:  Closed

Jump to the original submission

Sat 28 Aug 2021 02:28:05 PM UTC, comment #6: 

Ah sorry, I did reply with more info but I guess I didn't hit submit.

If it's any use, I wasn't using the nano packaged with Synology (if there even is one). To install it, first I installed 'Easy Bootstrap Installer' https://www.cphub.net/?p=ebi, which installed 'ipkg', which I used to install nano. I believe ipkg installed nano from this repo: http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/


nano_3.1-1_x86_64.ipk                              20-Oct-2018 08:23              233439




> stty size
88 155


On the Macbook I used the default terminal, not iTerm2. On Windows I'm using Terminal + Powershell 7.

`export TERM=vt100` > no change unfortunately

As well as the 'staircasing', the line number also changes in response to input. Here's a video demo: https://gfycat.com/unripeoblongafricanhornbill

Adam <slideelectric>
Fri 27 Aug 2021 10:35:01 AM UTC, comment #5: 

[I'm still curious.  On which terminal emulator were you running nano?  And what was its size ('stty size')?  Because the staircase-like display of random line numbers makes it seem like there was an off-by-one error somewhere, and maybe it gets triggered only at a specific window size.]

Aaah...  Now I've read also all the responses on the StackExchange issue, and there you say you use Windows Terminal, and later tried from a Macbook (iTerm2?).  It might have something to do with TERM being set to something that does not match what the Windows Terminal and Macbook terminal can actually do (some specific cursor-movement command -- xterm is clever, but many terminals that claim to be xterm-compatible are not really, not fully).  If you 'export TERM=vt100', do things then look better?

Benno Schulenberg <bens>
Group administrator
Thu 26 Aug 2021 10:18:18 AM UTC, comment #4: 

It would have been interesting to figure out what exactly was going wrong here.  I've looked at the website of Synology, and it seems they made some source code uploads to Sourceforge, but I can't find the source of nano among those files.  Maybe it's somewhere in one of the huge tarballs, but I'm not going to download 1.8 GB just to check.  So... okay, closing.

(Please adjust the title of the Stackexchange item to indicate that it is a problem of Synology, not of nano.)

Benno Schulenberg <bens>
Group administrator
Wed 25 Aug 2021 06:01:42 PM UTC, comment #3: 

Thanks for the responses! The output of the commands are below, but I realise now that the packages on Synology are terribly outdated, and they're unlikely to get updated. The package manager I have installed (ipkg) is abandoned and the successor (opkg) doesn't work on the latest Synology OS.

I think spending more time fixing this wouldn't be productive, so I think closing this bug report would be best.



> /bin/sh --version
GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-gnu)




> locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8




> ldd $(which nano)
        linux-vdso.so.1 (0x00007fff3e7ed000)
        libz.so.1 => /opt/lib/libz.so.1 (0x00007ff6ec3a9000)
        libmagic.so.1 => /opt/lib/libmagic.so.1 (0x00007ff6ec189000)
        libncursesw.so.5 => /opt/lib/libncursesw.so.5 (0x00007ff6ebf2e000)
        libc.so.6 => /opt/lib/libc.so.6 (0x00007ff6ebb91000)
        /opt/lib/ld-linux-x86-64.so.2 (0x00007ff6ec5c6000)


Adam <slideelectric>
Wed 25 Aug 2021 05:00:51 PM UTC, comment #2: 

The image that you provided cannot possibly have been produced by an unmodified nano-3.1.  Nano will always show a completely blank column after after the white columns in which the line numbers are shown.  It looks like your nano was modified somehow -- and modified wrongly.  Or, alternatively, the curses package on your machine is broken.  Please paste the full output of 'ldd $(which nano)' to see what curses your nano is using.

Benno Schulenberg <bens>
Group administrator
Wed 25 Aug 2021 02:56:16 PM UTC, comment #1: 

Version 3.1 is nearly three years old.  There have been many fixes since then.  Please build the latest version of nano (5.8) from source and see if you still see the same problem.  I am fairly confident that the problem you are seeing has been fixed.

However, if not, then please mention which terminal or terminal emulator you are using, what TERM is set to, and paste the full output of 'locale'.

Benno Schulenberg <bens>
Group administrator
Wed 25 Aug 2021 02:44:08 PM UTC, original submission:  

I have a

  • Synology with DSM 7.0-41890
  • GNU nano, version 3.1                                                                                                                                    


When I open any file in nano and line numbers are enabled, the line numbers are completely wrong, and appear on the wrong side (see attached image).

I also get an error message:

```
Badness: tried to display a line on row -1851878901 -- please report a bug
```

This problem only happens when `set linenumbers` is enabled in `nanorc`. When I comment out this line, nano works okay.


I originally posted this issue here: https://unix.stackexchange.com/questions/665865/nano-line-numbers-are-wrong-and-sometimes-appear-on-the-wrong-side-of-the-file

Adam <slideelectric>

 

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

Attached Files
file #51816:  O0yie.png added by slideelectric (60KiB - image/png - garbled display)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by slideelectric (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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-26 bens Open/ClosedOpen Closed
    2021-08-26 bens StatusNone Invalid
    2021-08-25 bens Summary'set linenumbers' is garbled, with message &quot;Badness: tried to display a line on row -1851878901&quot; with 'set linenumbers', the display is garbled in version 3.1
    2021-08-25 slideelectric Attached File- Added O0yie.png, #51816

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code