Bagoro / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Narrow column width for local sessions using vi #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Connectbot with a local session.
2. Start up vi or vim on a file.

What is the expected output? What do you see instead?

Expect to see the file as usual while editing it.  However, the column width is 
very narrow.  
Approximately 10 characters while using a 68 column screen font.

Note that this is only a problem for local sessions.

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?

ADP G1 using JesusFreke 1.51.  Also have installed Ubuntu Jaunty on the SD 
card.  I see this 
problem using the vi that comes with JF 1.51, as well as the vim installed 
under the Ubuntu 
chroot.

What type of system are you trying to connect to?

Local.

If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?

TERM=linux

Please provide any additional information below.

Original issue reported on code.google.com by ansibl...@gmail.com on 21 Jun 2009 at 4:57

GoogleCodeExporter commented 9 years ago
Issue 157 has been merged into this issue.

Original comment by kenny@the-b.org on 21 Jun 2009 at 4:31

GoogleCodeExporter commented 9 years ago
Slight correction:

When the screen was set to 68 columns, vi was using 18 of that.

'stty -a' reports the correct screen size.  ROWS and COLUMNS environment vars 
were
not initially set, but even setting those didn't help.

For yucks, I tried to run VIM under GNU screen, and things were really messed 
up.

Original comment by ansibl...@gmail.com on 22 Jun 2009 at 2:13

GoogleCodeExporter commented 9 years ago
I think I see the problem.

Check line 183 of src/org/connectbot/transport/Local.java.

I think the function signature is:

public static native void setPtyWindowSize(FileDescriptor fd, int row, int col, 
int
xpixel, int ypixel); 

So it looks like the row and column parameters to 
mExec_setPtyWindowSize.invoke() are
swapped.

Attached is an untested patch... I'm having Eclipse issues...

Original comment by ansibl...@gmail.com on 22 Jun 2009 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for looking into this.  It figures it would be something silly like 
that. I
put that in as r323

Original comment by kenny@the-b.org on 22 Jun 2009 at 11:30