Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nano doesn't sense X terminal resize
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
br14n
n00b
n00b


Joined: 10 Oct 2002
Posts: 43

PostPosted: Mon Oct 21, 2002 5:27 pm    Post subject: nano doesn't sense X terminal resize Reply with quote

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
View user's profile Send private message
magoo
n00b
n00b


Joined: 06 May 2002
Posts: 36
Location: Halifax, Canada

PostPosted: Mon Oct 21, 2002 6:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Mon Oct 21, 2002 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
br14n
n00b
n00b


Joined: 10 Oct 2002
Posts: 43

PostPosted: Mon Oct 21, 2002 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
br14n
n00b
n00b


Joined: 10 Oct 2002
Posts: 43

PostPosted: Tue Oct 22, 2002 5:23 am    Post subject: maybe resolved Reply with quote

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
View user's profile Send private message
br14n
n00b
n00b


Joined: 10 Oct 2002
Posts: 43

PostPosted: Tue Oct 22, 2002 5:26 am    Post subject: just a clarification Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum