View previous topic :: View next topic |
Author |
Message |
br14n n00b
Joined: 10 Oct 2002 Posts: 43
|
Posted: Mon Oct 21, 2002 5:27 pm Post subject: nano doesn't sense X terminal resize |
|
|
Is there a way to make nano automatically resize when I resize the terminal in which it's running? I generally use rxvt in ion. When I resize the terminal, nano stays at the previous dimensions and typing results in hideous garble. |
|
Back to top |
|
|
magoo n00b
Joined: 06 May 2002 Posts: 36 Location: Halifax, Canada
|
Posted: Mon Oct 21, 2002 6:39 pm Post subject: |
|
|
I am not sure if there is a way to update nano itself, but i suggest you save your work, quit nano, resize terminal, and rerun nano and it should work at the new terminal size. (works here for xterm/Eterm). _________________ magoo |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Mon Oct 21, 2002 6:45 pm Post subject: |
|
|
Mine resizes dynamically in multi-gnome-terminal, but if yours doesn't you can try Ctrl+L . That is the command to redraw the buffer. Do Ctrl+G for a full list of goodies. |
|
Back to top |
|
|
br14n n00b
Joined: 10 Oct 2002 Posts: 43
|
Posted: Mon Oct 21, 2002 8:43 pm Post subject: |
|
|
I found it helps to run 'resize' before starting nano. At that point, nano has the correct dimensions (it's maximized over the area of the term). However, subsequent resizes result in redraw screwups. Shrug. |
|
Back to top |
|
|
br14n n00b
Joined: 10 Oct 2002 Posts: 43
|
Posted: Tue Oct 22, 2002 5:23 am Post subject: maybe resolved |
|
|
Okay, I think I may have done some good with a tiny change to the nano 1.0.9 sources.
My nano.c's lines 2784-2785 now read
case 410: /* Must ignore this, it gets sent when we resize */
resizeterm(LINES, COLS);
Previously 410 was just falling through with a bunch of other stuff. I have no understanding of the issues involved with terminal emulation, but this change seems to have fixed the horrible redraw screwups. |
|
Back to top |
|
|
br14n n00b
Joined: 10 Oct 2002 Posts: 43
|
Posted: Tue Oct 22, 2002 5:26 am Post subject: just a clarification |
|
|
Just to be clear; I moved that case 410 up to the top of the switch and added the resizeterm. Probably a break; after that would be good, too, now that I think about it. |
|
Back to top |
|
|
|