Ticket #2907 (closed defect: worksforme)

Opened 12 years ago

Last modified 2 months ago

4.8.x subshell input line is limited to 80 characters, and is overwritten when filled instead of continuing on the next line

Reported by: drookie Owned by:
Priority: minor Milestone:
Component: mc-tty Version: 4.8.13
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Subshell input line is limited to 80 characters, and is overwritten when filled instead of continuing on the next line.

Uname:

# uname -a
SunOS anthe 5.11 11.0 i86pc i386 i86pc

Info:

# /usr/local/mc-4.8.6/bin/mc -V
GNU Midnight Commander 4.8.6
Built with GLib 2.28.6
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

I attached the screenshot demonstrating the issue:

  • the first sequence of 'x' characters is typed in the subshell of the MC 4.7.5.2. When the line is filled, subshell continues typing on the next line.
  • the second sequence of the 'x' chacacters is typed under the subshell of the 4.8.6 version. When the chacacter reaches the 80th position (however, the terminal has 120x45 geometry) the input line is overwritten (the cursor replaces the subshell prompt) and the whole thing is looped (the line is overwritten again and again).

Attachments

mc-subshell.png (71.6 KB) - added by drookie 12 years ago.
revert-sigwinch-setup.diff (4.4 KB) - added by andrew_b 12 years ago.

Change History

Changed 12 years ago by drookie

comment:1 in reply to: ↑ description ; follow-up: ↓ 2 Changed 12 years ago by andrew_b

Replying to drookie:

I attached the screenshot demonstrating the issue:

Looks like Putty on Windows.

When the chacacter reaches the 80th position (however, the terminal has 120x45 geometry) the input line is overwritten.

Show the result of command

echo $LINES $COLUMNS

comment:2 in reply to: ↑ 1 Changed 12 years ago by drookie

Replying to andrew_b:

Replying to drookie:

I attached the screenshot demonstrating the issue:

Looks like Putty on Windows.

Yup ! It is.

Show the result of command

echo $LINES $COLUMNS

(pure bash)
[root@anthe ~]# echo $LINES $COLUMNS
44 130
(mc 4.8.6 subshell)
[root@anthe ~]# /usr/local/mc-4.8.6/bin/mc
[root@anthe ~]# echo $LINES $COLUMNS
65 80
(mc 4.7.5.2 subshell)
[root@anthe ~]# /usr/local/mc/bin/mc
[root@anthe ~]# echo $LINES $COLUMNS
44 130

Last edited 12 years ago by drookie (previous) (diff)

comment:3 Changed 12 years ago by drookie

Please excuse me, I was wrong about 120x45. It is indeed 130x44, bash and the 4.7.5.2 subshell report its geometry correctly, 4.8.6 subshell - does not.

comment:4 Changed 12 years ago by andrew_b

The main difference I've found between 4.7.5.x and 4.8.x branches is SIWGINCH handler setup: in 4.7.5.x after subshel init, in 4.8.x before one. I created a patch that reverts SIWGINCH handler setup in 4.8.x. Could you please test it?

Changed 12 years ago by andrew_b

comment:5 Changed 12 years ago by drookie

Sure.

I applied the patch to the DEV branch you gave me in #2906.
I applied the patch, redid the gmake (to my knowledge, it should rebuild only the changed files and all of its dependencies) and launched the newly built binary. All went fine without any errors.

From what I see, it seems like nothing changed: the input line is still overwriting, the subshell reports wrong geometry.

Version 0, edited 12 years ago by drookie (next)

comment:6 Changed 12 years ago by drookie

By the way, I tested if this is somehow related to the putty - I can say I can reproduce the bug under the KDE 4.8.4 konsole - FreeBSD 9.1-PRERELEASE, when I use the FreeBSD ssh to log in to the target machine mentioned above.

comment:7 Changed 12 years ago by drookie

Still there in 4.8.8.

comment:8 Changed 12 years ago by drookie

FreeBSD has the 4.8.1.4 version in ports with local patches. I've tried this version on solaris, even with one patch (others were looking like they definitely have nothing to do with a problem), but this is still reproducible. While on FreeBSD it's not.
Weird !

comment:9 Changed 10 years ago by drookie

Still there in 4.8.12.

comment:10 Changed 2 months ago by zaytsev

  • Status changed from new to closed
  • Version changed from master to 4.8.13
  • Resolution set to worksforme
  • Milestone Future Releases deleted
[zaytsev@freebsd ~]$ uname -a
FreeBSD freebsd 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC arm64

Not reproducible with latest master.

Oracle Solaris 11.4.42.111.0                  Assembled December 2021
root@solaris:~# uname -a
SunOS solaris 5.11 11.4.42.111.0 i86pc i386 i86pc non-virtualized

test@solaris:~$ mc -V
GNU Midnight Commander 4.8.13
Built with GLib 2.28.6
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

Reproducible with 4.8.13, but not with the latest master.

Bugs fix themselves if you wait enough years :)

comment:11 Changed 2 months ago by zaytsev

Apparently fixed in #4099.

Note: See TracTickets for help on using tickets.