lichray / nvi2

A multibyte fork of the nvi editor for BSD
Other
144 stars 34 forks source link

fix -w option #86

Closed fernape closed 3 years ago

fernape commented 3 years ago

Reported in FreeBSD's Bugzilla PR 241985

Compose the "window=%s" option as a CHAR_T to be processed properly in opts_set

Before the patch, trying this:

$ vi -w 10

shows an error:

set: no wo0 option: 'set all' gives all option values
Press Enter to continue:

And vi launches with as many lines as to fill the terminal screen

------------ BEGINING OF SCREEN

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
------------ END OF SCREEN

After the patch, thre is no error

$ vi -w 10

and the vi screen is limited to the specified amount of lines:

------------ BEGINING OF SCREEN

~
~
~
~
~
~
~
~
~
------------ END OF SCREEN
lichray commented 3 years ago

Thank you for the fix.