bugGNU nano - Bugs: bug #57513, with Slang, nano does not adapt to...

 
 

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

bug #57513: with Slang, nano does not adapt to window resizes

Submitter:  Benno Schulenberg <bens>
Submitted:  Wed 01 Jan 2020 12:25:50 PM UTC
   
 
Severity:  3 - Normal Status:  Wont Fix
Assigned to:  bens Open/Closed:  Closed

Sun 09 Feb 2020 10:33:03 AM UTC, comment #5: 

Since version 4.8, only a tiny nano can be built with --with-slang, and tiny nanos ignore all window resizes, so the problem is avoided.

Benno Schulenberg <bens>
Group administrator
Fri 03 Jan 2020 10:52:20 AM UTC, comment #4: 

The problem is sidestepped by commit 2867f1bb: when built with Slang, terminal resizes are ignored.

Benno Schulenberg <bens>
Group administrator
Wed 01 Jan 2020 06:34:59 PM UTC, comment #3: 

In mc (Midnight Commander, which uses Slang on my system), resizing the window works fine: the sizes of the panels are adjusted immediately.  So it seems nano is doing something wrong.

Benno Schulenberg <bens>
Group administrator
Wed 01 Jan 2020 01:21:10 PM UTC, comment #2: 

Partially fixed in commit c4d2bf59.

Benno Schulenberg <bens>
Group administrator
Wed 01 Jan 2020 12:40:42 PM UTC, comment #1: 

When commenting out the #ifdef REDEFINING_MACROS_OK and its #endif in a current nano, then resizing with --with-slang works again, but... the resizing occurs only at the moment of typing the first character after the resize.  :|  This cannot be worked around by adding an ungetch() to the handle_sigwinch() routine, because apparently it doesn't trigger wgetch() to return.  :|  (Maybe because it mistakenly adds the pushed character at the end of the empty queue instead of at its beginning, because when you then type a character, first the typed character comes out and then the pushed one. :| )

So...  This doesn't look like it's fixable.  Probably we should do what Jordi suggested at the end of https://lists.gnu.org/archive/html/nano-devel/2016-08/msg00068.html : making --with-slang usable only together with --enable-tiny.  Because the only reason we still support Slang is to allow Debian to build (for the initrd of their installer) a tiny nano that uses Slang instead of ncurses

Benno Schulenberg <bens>
Group administrator
Wed 01 Jan 2020 12:25:50 PM UTC, original submission:  

To reproduce, configure nano with --with-slang, compile, and then run 'src/nano --ignore'.  Then resize the window.  See that the title bar and the help lines do not get adjusted for the new size.

In version 2.0.6 it still worked.  After that it gets harder to check, because --with-slang started to imply --enable-tiny.  When manually cutting out that part from the configure script, it still worked in 2.1.10, and had stopped working in 2.2.4.

Bisecting is not feasible, because those old versions from git don't compile any more.  But the most likely culprit seems to be be commit 42bd871a.  When commenting out that #ifdef REDEFINIG_MACROS_OK and its corresponding #endif, then resizing works again also in 2.2.4 (when compiled with --with-slang).

Benno Schulenberg <bens>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-09 bens Open/ClosedOpen Closed
    2020-01-03 bens StatusInvalid Wont Fix
    2020-01-03 bens StatusIn Progress Invalid
    2020-01-01 bens StatusNone In Progress
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code