Bug 63148 - konsole ought to communicate number of columns (and lines) to vi
Summary: konsole ought to communicate number of columns (and lines) to vi
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-23 03:58 UTC by Lucius Chiaraviglio
Modified: 2006-08-11 13:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucius Chiaraviglio 2003-08-23 03:58:15 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2.1 
OS:          Linux

If you resize a konsole session and then start vi (actually VIM - Vi IMproved 6.1 (2002 Mar 24, compiled Jul 20 2003 00:52:33)), vi still thinks that it has an 80 column screen.  In contrast, if you start an xterm (actually XFree86 4.2.99.903(174)) under KDE and resize it, vi recognizes that the number of columns and lines has changed, even if vi is already running during the resize.  It would be nice to add this feature to konsole.
Comment 1 Kurt Hindenburg 2004-02-04 17:59:43 UTC
Using kde 3.2rc1 and vim 6.2, it works for me.  Test it by issuing in vim ":set lines columns".  Then change the konsole window and use the :set command again.  Vim knows the correct lines and columns.
Comment 2 Lucius Chiaraviglio 2004-02-08 06:58:27 UTC
After seeing your comment, I did a bit more testing and found that what you are saying does indeed work, EXCEPT that if you resize the window (for instance, to 125 * 41) BEFORE you start vim, it then thinks that it has 80 columns even though the window is wider.  In contrast, if you resize an xterm to some large size and then start vim, the xterm gets resized to 80 columns (but again, if you resize the xterm while vim is running, it recognizes the change).  WIERD.  Maybe this is actually a vim bug?  But clearly konsole is doing something different than xterm in this regard.

(And I could have sworn that xterm used to not get resized, but instead caused vim to start knowing that it had >80 columns -- maybe upgrading XFree86 from 4.3.0 to 4.3.99.902 = 4.4rc2 broke something in the interaction between xterm and vim?)

By the way, my konsole version is 1.2 (supplied with KDE 3.1.0 -- this information apparently didn't make it into my original feature request).  I haven't yet tried the above tests under KDE 3.1.5, but plan to do so after I perform some other necessary upgrades.
Comment 3 Kurt Hindenburg 2004-05-26 20:41:58 UTC
Everything I try using kde3.2.2/CVS and VIM - Vi IMproved 6.2 (gentoo, who adds a lot of patches) works.
I've tried using different sizes of konsole, then starting vim, then resizing konsole... looks good to me.

xterm from XFree86 4.2.99.903(174) works the same way as konsole does (it appears to me).

Comment 4 Lucius Chiaraviglio 2004-06-06 23:30:10 UTC
Had a major hard drive fry; restored my system and then upgraded to XFree86 4.4.0 (but have not yet upgraded KDE).  Now, vi seems not to get the right information about number of columns (defaults to 80) when it is started (but it does get the lines right), but seems to get all information properly when the window is resized (in konsole or xterm) while vi is running.  So now it ALMOST works right.
Comment 5 Robert Knight 2006-08-11 13:22:09 UTC
Marked as fixed for now.  Please reopen if still an issue.