Ticket #1583 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

CTRL-O keystroke redrawing problem under screen after upgrade 4.7.0-pre1 - 4.7.0-pre2

Reported by: vladimir Owned by: andrew_b
Priority: major Milestone: 4.7.0-pre3
Component: mc-tty Version: 4.7.0-pre2
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description

After upgrade from 4.7.0-pre1 to 4.7.0-pre2 CTRL-O keystroke clears screen under GNU screen. The version 4.7.0-pre1 works as expected under screen if altscreen parameter is "on". I've tried compiling with ncurses and slang, but behavior is the same.

Attachments

mc_ncurses.jpg (33.4 KB) - added by vladimir 15 years ago.
mc is compiled with ncurses and TERM=rxvt-unicode under screen

Change History

comment:1 Changed 15 years ago by iNode

Works for me

mc -V
GNU Midnight Commander 4.7.0-pre2-26-gee10da9
Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish
With builtin Editor
Using system-installed S-Lang library with terminfo database
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
Data types: char 8 int 32 long 32 void * 32 off_t 64 ecs_char 3

Please describe more detailed reporoduce it.
My check ls -l and C-o in mc.

comment:2 follow-up: ↓ 3 Changed 15 years ago by iNode

*how to reproduce it

comment:3 in reply to: ↑ 2 Changed 15 years ago by vladimir

Replying to iNode:

*how to reproduce it

1) > screen
2) > mc
3) C-o in mc; ls -l; C-o; C-o the window is blank
Just to be sure: Are you running mc under "screen"?

comment:4 follow-up: ↓ 5 Changed 15 years ago by iNode

Yes. I'm run it in screen with :altscreen on (by hand),
and TERM=rxvt-unicode. And all work properly.

comment:5 in reply to: ↑ 4 Changed 15 years ago by vladimir

Replying to iNode:

Yes. I'm run it in screen with :altscreen on (by hand),
and TERM=rxvt-unicode. And all work properly.

Oke, the problem is the TERM variable. BTW, I'm using rxvt-unicode as well, so if I do "export TERM=rxvt-unicode" C-o works as expected, but not if TERM=screen. However, the previous version of mc (4.7.0-pre1) works fine with TERM=screen as well (I've checked with slang and ncurses).

comment:6 Changed 15 years ago by vladimir

One more note concerning TERM variable under screen. If mc-4.7.0-pre2 compiled with ncurses and TERM is rxvt-unicode under screen, I see strange colors (see the attached screenshot). Everything is fine if TERM=screen.

Changed 15 years ago by vladimir

mc is compiled with ncurses and TERM=rxvt-unicode under screen

comment:7 in reply to: ↑ description Changed 15 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Component changed from mc-core to mc-tty
  • severity changed from no branch to on review
  • Milestone changed from 4.7 to 4.7.0-pre3

Replying to vladimir:

After upgrade from 4.7.0-pre1 to 4.7.0-pre2 CTRL-O keystroke clears screen under GNU screen. The version 4.7.0-pre1 works as expected under screen if altscreen parameter is "on". I've tried compiling with ncurses and slang, but behavior is the same.

This bug is a result of changeset:828d1ed09e2a2f21c974bb1969d816d1bbb6b3f1

 void
 do_enter_ca_mode (void)
 {
-    if (!xterm_flag)
-       return;
-    fprintf (stdout, /* ESC_STR ")0" */ ESC_STR "7" ESC_STR "[?47h");
-    fflush (stdout);
+    if (!xterm_flag) {
+           fprintf (stdout, /* ESC_STR ")0" */ ESC_STR "7" ESC_STR "[?47h");
+           fflush (stdout);
+    }
 }
 
 void
 do_exit_ca_mode (void)
 {
-    if (!xterm_flag)
-       return;
-    fprintf (stdout, ESC_STR "[?47l" ESC_STR "8" ESC_STR "[m");
-    fflush (stdout);
+    if (!xterm_flag) {
+           fprintf (stdout, ESC_STR "[?47l" ESC_STR "8" ESC_STR "[m");
+           fflush (stdout);
+    }
+}

Created branch 1538_ctrl_o_under_screen. Parent branch: master.
changeset:6fb9e39d14265ba4231733c0a418689b83e71500

comment:8 Changed 15 years ago by slavazanko

  • Votes for changeset set to slavazanko

I'm run it in screen with :altscreen on (by hand),
and with untouched TERM variable. Works as need.

Vote here.

comment:9 Changed 15 years ago by andrew_b

Sorry, branch has incorrect name. Removed.

New branch 1583_ctrl_o_under_screen. Parent branch: master.
changeset:49313d21958e9928ea0f0459a2258b16089a58af

comment:10 Changed 15 years ago by iNode

  • Votes for changeset changed from slavazanko to slavazanko iNode
  • severity changed from on review to approved

comment:11 Changed 15 years ago by andrew_b

  • Votes for changeset changed from slavazanko iNode to commited-master
  • severity changed from approved to merged

comment:12 Changed 15 years ago by andrew_b

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:13 Changed 15 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.