mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
updated for version 7.0005
This commit is contained in:
parent
cfbc5ee48e
commit
592e0a2a1d
@ -1,4 +1,4 @@
|
|||||||
*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
|
*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -3881,8 +3881,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
precedes:c Character to show in the first column, when 'wrap'
|
precedes:c Character to show in the first column, when 'wrap'
|
||||||
is off and there is text preceding the character
|
is off and there is text preceding the character
|
||||||
visible in the first column.
|
visible in the first column.
|
||||||
nbsp:c Character to show for non-breakable space. Left to
|
nbsp:c Character to show for a non-breakable space (character
|
||||||
blank when omitted.
|
0xA0, 160). Left blank when omitted.
|
||||||
|
|
||||||
The characters ':' and ',' should not be used. UTF-8 characters can
|
The characters ':' and ',' should not be used. UTF-8 characters can
|
||||||
be used when 'encoding' is "utf-8", otherwise only printable
|
be used when 'encoding' is "utf-8", otherwise only printable
|
||||||
@ -4260,10 +4260,26 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
Print the line number in front of each line. When the 'n' option is
|
Print the line number in front of each line. When the 'n' option is
|
||||||
excluded from 'cpoptions' a wrapped line will not use the column of
|
excluded from 'cpoptions' a wrapped line will not use the column of
|
||||||
line numbers (this is the default when 'compatible' isn't set).
|
line numbers (this is the default when 'compatible' isn't set).
|
||||||
|
The 'numberwidth' option can be used to set the room used for the line
|
||||||
|
number.
|
||||||
When a long, wrapped line doesn't start with the first character, '-'
|
When a long, wrapped line doesn't start with the first character, '-'
|
||||||
characters are put before the number.
|
characters are put before the number.
|
||||||
See |hl-LineNr| for the highlighting used for the number.
|
See |hl-LineNr| for the highlighting used for the number.
|
||||||
|
|
||||||
|
*'numberwidth'* *'nuw'*
|
||||||
|
'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8)
|
||||||
|
local to window
|
||||||
|
Minimal number of columns to use for the line number. Only relevant
|
||||||
|
when the 'number' option is set.
|
||||||
|
Since one space is always between the number and the text, there is
|
||||||
|
one less character for the number itself.
|
||||||
|
The value is the minimum width. A bigger width is used when needed to
|
||||||
|
fit the highest line number in the buffer. Thus with the Vim default
|
||||||
|
of 4 there is room for a line number up to 999. When the buffer has
|
||||||
|
1000 lines five columns will be used.
|
||||||
|
The minimum value is 1, the maximum value is 10.
|
||||||
|
NOTE: 'numberwidth' is reset to 8 when 'compatible' is set.
|
||||||
|
|
||||||
*'osfiletype'* *'oft'* *E366*
|
*'osfiletype'* *'oft'* *E366*
|
||||||
'osfiletype' 'oft' string (RISC-OS default: "Text",
|
'osfiletype' 'oft' string (RISC-OS default: "Text",
|
||||||
others default: "")
|
others default: "")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
|
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -764,6 +764,7 @@ Short explanation of each option: *option-list*
|
|||||||
|'mousetime'| |'mouset'| max time between mouse double-click
|
|'mousetime'| |'mouset'| max time between mouse double-click
|
||||||
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|
||||||
|'number'| |'nu'| print the line number in front of each line
|
|'number'| |'nu'| print the line number in front of each line
|
||||||
|
|'numberwidth'| |'nuw'| number of columns used for the line number
|
||||||
|'osfiletype'| |'oft'| operating system-specific filetype information
|
|'osfiletype'| |'oft'| operating system-specific filetype information
|
||||||
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|
||||||
|'paste'| allow pasting text
|
|'paste'| allow pasting text
|
||||||
|
@ -589,6 +589,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
|||||||
'nrformats' options.txt /*'nrformats'*
|
'nrformats' options.txt /*'nrformats'*
|
||||||
'nu' options.txt /*'nu'*
|
'nu' options.txt /*'nu'*
|
||||||
'number' options.txt /*'number'*
|
'number' options.txt /*'number'*
|
||||||
|
'numberwidth' options.txt /*'numberwidth'*
|
||||||
|
'nuw' options.txt /*'nuw'*
|
||||||
'oft' options.txt /*'oft'*
|
'oft' options.txt /*'oft'*
|
||||||
'op' vi_diff.txt /*'op'*
|
'op' vi_diff.txt /*'op'*
|
||||||
'open' vi_diff.txt /*'open'*
|
'open' vi_diff.txt /*'open'*
|
||||||
@ -4703,6 +4705,12 @@ g:explSuffixesLast pi_expl.txt /*g:explSuffixesLast*
|
|||||||
g:explUseSeparators pi_expl.txt /*g:explUseSeparators*
|
g:explUseSeparators pi_expl.txt /*g:explUseSeparators*
|
||||||
g:explVertical pi_expl.txt /*g:explVertical*
|
g:explVertical pi_expl.txt /*g:explVertical*
|
||||||
g:explWinSize pi_expl.txt /*g:explWinSize*
|
g:explWinSize pi_expl.txt /*g:explWinSize*
|
||||||
|
g:netrw_a pi_netrw.txt /*g:netrw_a*
|
||||||
|
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
|
||||||
|
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
|
||||||
|
g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd*
|
||||||
|
g:netrw_rmdir_cmd pi_netrw.txt /*g:netrw_rmdir_cmd*
|
||||||
|
g:netrw_rmf_cmd pi_netrw.txt /*g:netrw_rmf_cmd*
|
||||||
g:var eval.txt /*g:var*
|
g:var eval.txt /*g:var*
|
||||||
g; motion.txt /*g;*
|
g; motion.txt /*g;*
|
||||||
g<Down> motion.txt /*g<Down>*
|
g<Down> motion.txt /*g<Down>*
|
||||||
@ -5389,10 +5397,15 @@ netbeans-setup netbeans.txt /*netbeans-setup*
|
|||||||
netbeans-support netbeans.txt /*netbeans-support*
|
netbeans-support netbeans.txt /*netbeans-support*
|
||||||
netbeans.txt netbeans.txt /*netbeans.txt*
|
netbeans.txt netbeans.txt /*netbeans.txt*
|
||||||
netrw pi_netrw.txt /*netrw*
|
netrw pi_netrw.txt /*netrw*
|
||||||
|
netrw-- pi_netrw.txt /*netrw--*
|
||||||
|
netrw-D pi_netrw.txt /*netrw-D*
|
||||||
netrw-activate pi_netrw.txt /*netrw-activate*
|
netrw-activate pi_netrw.txt /*netrw-activate*
|
||||||
netrw-browse pi_netrw.txt /*netrw-browse*
|
netrw-browse pi_netrw.txt /*netrw-browse*
|
||||||
netrw-browse-var pi_netrw.txt /*netrw-browse-var*
|
netrw-browse-var pi_netrw.txt /*netrw-browse-var*
|
||||||
|
netrw-c-l pi_netrw.txt /*netrw-c-l*
|
||||||
|
netrw-cadaver pi_netrw.txt /*netrw-cadaver*
|
||||||
netrw-contents pi_netrw.txt /*netrw-contents*
|
netrw-contents pi_netrw.txt /*netrw-contents*
|
||||||
|
netrw-cr pi_netrw.txt /*netrw-cr*
|
||||||
netrw-credits pi_netrw.txt /*netrw-credits*
|
netrw-credits pi_netrw.txt /*netrw-credits*
|
||||||
netrw-debug pi_netrw.txt /*netrw-debug*
|
netrw-debug pi_netrw.txt /*netrw-debug*
|
||||||
netrw-delete pi_netrw.txt /*netrw-delete*
|
netrw-delete pi_netrw.txt /*netrw-delete*
|
||||||
@ -5400,20 +5413,27 @@ netrw-dir pi_netrw.txt /*netrw-dir*
|
|||||||
netrw-ex pi_netrw.txt /*netrw-ex*
|
netrw-ex pi_netrw.txt /*netrw-ex*
|
||||||
netrw-file pi_netrw.txt /*netrw-file*
|
netrw-file pi_netrw.txt /*netrw-file*
|
||||||
netrw-fixup pi_netrw.txt /*netrw-fixup*
|
netrw-fixup pi_netrw.txt /*netrw-fixup*
|
||||||
|
netrw-ftp pi_netrw.txt /*netrw-ftp*
|
||||||
|
netrw-h pi_netrw.txt /*netrw-h*
|
||||||
|
netrw-help pi_netrw.txt /*netrw-help*
|
||||||
netrw-history pi_netrw.txt /*netrw-history*
|
netrw-history pi_netrw.txt /*netrw-history*
|
||||||
netrw-list pi_netrw.txt /*netrw-list*
|
netrw-list pi_netrw.txt /*netrw-list*
|
||||||
netrw-list-hack pi_netrw.txt /*netrw-list-hack*
|
netrw-list-hack pi_netrw.txt /*netrw-list-hack*
|
||||||
netrw-move pi_netrw.txt /*netrw-move*
|
netrw-move pi_netrw.txt /*netrw-move*
|
||||||
netrw-netrc pi_netrw.txt /*netrw-netrc*
|
netrw-netrc pi_netrw.txt /*netrw-netrc*
|
||||||
|
netrw-o pi_netrw.txt /*netrw-o*
|
||||||
netrw-options pi_netrw.txt /*netrw-options*
|
netrw-options pi_netrw.txt /*netrw-options*
|
||||||
netrw-passwd pi_netrw.txt /*netrw-passwd*
|
netrw-passwd pi_netrw.txt /*netrw-passwd*
|
||||||
netrw-protocol pi_netrw.txt /*netrw-protocol*
|
netrw-protocol pi_netrw.txt /*netrw-protocol*
|
||||||
|
netrw-r pi_netrw.txt /*netrw-r*
|
||||||
netrw-ref pi_netrw.txt /*netrw-ref*
|
netrw-ref pi_netrw.txt /*netrw-ref*
|
||||||
netrw-remove pi_netrw.txt /*netrw-remove*
|
netrw-remove pi_netrw.txt /*netrw-remove*
|
||||||
netrw-rename pi_netrw.txt /*netrw-rename*
|
netrw-rename pi_netrw.txt /*netrw-rename*
|
||||||
|
netrw-s pi_netrw.txt /*netrw-s*
|
||||||
netrw-transparent pi_netrw.txt /*netrw-transparent*
|
netrw-transparent pi_netrw.txt /*netrw-transparent*
|
||||||
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
|
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
|
||||||
netrw-urls pi_netrw.txt /*netrw-urls*
|
netrw-urls pi_netrw.txt /*netrw-urls*
|
||||||
|
netrw-v pi_netrw.txt /*netrw-v*
|
||||||
netrw-var pi_netrw.txt /*netrw-var*
|
netrw-var pi_netrw.txt /*netrw-var*
|
||||||
netrw-x pi_netrw.txt /*netrw-x*
|
netrw-x pi_netrw.txt /*netrw-x*
|
||||||
netrw-xfer pi_netrw.txt /*netrw-xfer*
|
netrw-xfer pi_netrw.txt /*netrw-xfer*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
|
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -30,32 +30,10 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
|||||||
*known-bugs*
|
*known-bugs*
|
||||||
-------------------- Known bugs and current work -----------------------
|
-------------------- Known bugs and current work -----------------------
|
||||||
|
|
||||||
|
Docs for 'numberwidth'. index. optwin.vim
|
||||||
|
|
||||||
For version 7.0:
|
For version 7.0:
|
||||||
- Include many PATCHES:
|
- Include many PATCHES:
|
||||||
7 Add "nbsp" in 'listchars'? Patch from David Blanchet, 2003 Jul 28.
|
|
||||||
again 2004 Jun 16
|
|
||||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
|
||||||
Aric Blumer has a patch for this.
|
|
||||||
He will update the patch for 6.3.
|
|
||||||
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
|
|
||||||
set highlighting with "CursorColumn" group. Useful for aligning text.
|
|
||||||
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
|
|
||||||
underlining the cursor line, 2004 Mar 24. Update 2004 Jun 17
|
|
||||||
Alternatie: when 'number' is set highlight the number of the current
|
|
||||||
line.
|
|
||||||
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
|
||||||
Update 2004 Jun 17.
|
|
||||||
8 Patches from Peter "Rain Dog" Cucka:
|
|
||||||
- guifont selector (2002 Dec 15)
|
|
||||||
update 2004 Jun 20
|
|
||||||
7 Add an option to set the width of the 'number' column. Eight
|
|
||||||
positions is often more than needed. Or adjust the width to the
|
|
||||||
length of the file?
|
|
||||||
Add patch that adds 'numberlen' option. (James Harvey)
|
|
||||||
Other patch with min and max from Emmanuel Renieris (2002 Jul 24)
|
|
||||||
Other patch without an option by Gilles Roy (2002 Jul 25)
|
|
||||||
New patch from Emmanuel Renieris, 2004 Jun 17
|
|
||||||
Needs more work: use one option with one or two numbers
|
|
||||||
7 Be able to call a function while passing on a variable number of
|
7 Be able to call a function while passing on a variable number of
|
||||||
arguments:
|
arguments:
|
||||||
:function Foo(abc, ...)
|
:function Foo(abc, ...)
|
||||||
@ -88,6 +66,9 @@ For version 7.0:
|
|||||||
Resp: no time now.
|
Resp: no time now.
|
||||||
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
|
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
|
||||||
but it doesn't use "initdir" or "dflt". (will update patch)
|
but it doesn't use "initdir" or "dflt". (will update patch)
|
||||||
|
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||||
|
Aric Blumer has a patch for this.
|
||||||
|
He will update the patch for 6.3.
|
||||||
8 Add buffer-local autocommands? Reduces overhead for autocommands that
|
8 Add buffer-local autocommands? Reduces overhead for autocommands that
|
||||||
trigger often (inserting a character, switching mode).
|
trigger often (inserting a character, switching mode).
|
||||||
:au Event <buffer> do-something
|
:au Event <buffer> do-something
|
||||||
@ -100,6 +81,13 @@ For version 7.0:
|
|||||||
VimResized - When the Vim window has been resized (SIGWINCH)
|
VimResized - When the Vim window has been resized (SIGWINCH)
|
||||||
patch from Yakov Lerner, 2003 July 24.
|
patch from Yakov Lerner, 2003 July 24.
|
||||||
He'll write documentation and send updated patch.
|
He'll write documentation and send updated patch.
|
||||||
|
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
||||||
|
Update 2004 Jun 17.
|
||||||
|
How does this work? Missing comments.
|
||||||
|
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
|
||||||
|
Update 2004 Jun 17
|
||||||
|
Missing docs. Search in 'runtimepath'?
|
||||||
|
How to get the messages into the .po files?
|
||||||
--- responses above --
|
--- responses above --
|
||||||
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
|
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
|
||||||
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
|
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
|
||||||
@ -152,10 +140,6 @@ For version 7.0:
|
|||||||
find() find file in 'path' (patch from Johannes
|
find() find file in 'path' (patch from Johannes
|
||||||
Zellner 2001 Dec 20)
|
Zellner 2001 Dec 20)
|
||||||
Update 2004 Jun 16.
|
Update 2004 Jun 16.
|
||||||
gettext() Translate a message. (Patch from Yasuhiro
|
|
||||||
Matsumoto) How to get the messages into the
|
|
||||||
.po files?
|
|
||||||
Update 2004 Jun 17
|
|
||||||
realname() Get user name (first, last, full)
|
realname() Get user name (first, last, full)
|
||||||
user_fullname() patch by Nikolai Weibull, Nov
|
user_fullname() patch by Nikolai Weibull, Nov
|
||||||
3 2002)
|
3 2002)
|
||||||
@ -221,6 +205,7 @@ For version 7.0:
|
|||||||
|
|
||||||
- In the kvim/KDE source files fix the formatting.
|
- In the kvim/KDE source files fix the formatting.
|
||||||
- KDE version is called "kvim". Make it "gvim", like the others?
|
- KDE version is called "kvim". Make it "gvim", like the others?
|
||||||
|
- Better configure check for KDE include files from Dan Sharp.
|
||||||
- Change ga_room into ga_maxlen, so that it doesn't need to be
|
- Change ga_room into ga_maxlen, so that it doesn't need to be
|
||||||
incremented/decremented each time.
|
incremented/decremented each time.
|
||||||
- For string variables, use length instead of NUL termination.
|
- For string variables, use length instead of NUL termination.
|
||||||
@ -289,10 +274,15 @@ For version 7.0:
|
|||||||
- Mac: Unicode input and display (Eckehard Berns, June 27)
|
- Mac: Unicode input and display (Eckehard Berns, June 27)
|
||||||
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
|
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
|
||||||
New patch 2004 Jun 16
|
New patch 2004 Jun 16
|
||||||
7 Add the MzScheme interface?
|
7 Add the MzScheme interface? New patch 2004 Jul 2. (Sergey Khorev)
|
||||||
NO: it changes too much of the code, while hardly anybody will use it.
|
Also fix a few Lisp problems.
|
||||||
Patch on http://iamphet.nm.ru/scheme/ (Sergey Khorev)
|
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
|
||||||
Alt URL: http://cyber.miem.edu.ru/~iamphet/scheme/mzvim-0.560.tar.gz
|
set highlighting with "CursorColumn" group. Useful for aligning text.
|
||||||
|
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
|
||||||
|
underlining the cursor line: 2004 Jun 17. Should use highlight group
|
||||||
|
instead.
|
||||||
|
Alternative: when 'number' is set highlight the number of the current
|
||||||
|
line.
|
||||||
|
|
||||||
Vi incompatibility:
|
Vi incompatibility:
|
||||||
8 With undo/redo only marks in the changed lines should be changed. Other
|
8 With undo/redo only marks in the changed lines should be changed. Other
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
|
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -86,6 +86,8 @@ Options: ~
|
|||||||
mode to do any kind of completion. (Taro Muraoka)
|
mode to do any kind of completion. (Taro Muraoka)
|
||||||
'quoteescape' Characters used to escape quotes inside a string.
|
'quoteescape' Characters used to escape quotes inside a string.
|
||||||
Used for the a", a' and a` text objects. |a'|
|
Used for the a", a' and a` text objects. |a'|
|
||||||
|
'numberwidth' Minimal width of the space used for the 'number'
|
||||||
|
option. (Emmanuel Renieris)
|
||||||
|
|
||||||
Ex commands: ~
|
Ex commands: ~
|
||||||
|
|
||||||
@ -116,6 +118,8 @@ character selections can be used between two Vims. (Eckehard Berns)
|
|||||||
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
|
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
|
||||||
"yyp".
|
"yyp".
|
||||||
|
|
||||||
|
Mac: GUI font selector. (Peter "Rain Dog" Cucka)
|
||||||
|
|
||||||
The netrw plugin now also supports viewing a directory, when "scp://" is used.
|
The netrw plugin now also supports viewing a directory, when "scp://" is used.
|
||||||
Deleting and renaming files is possible. (Charles Campbell)
|
Deleting and renaming files is possible. (Charles Campbell)
|
||||||
|
|
||||||
@ -133,6 +137,8 @@ few more important commands. Used ideas from Gabriel Zachmann.
|
|||||||
Unix: When libcall() fails obtain an error message with dlerror() and display
|
Unix: When libcall() fails obtain an error message with dlerror() and display
|
||||||
it. (Johannes Zellner)
|
it. (Johannes Zellner)
|
||||||
|
|
||||||
|
Added "nbsp" in 'listchars'. (David Blanchet)
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
COMPILE TIME CHANGES *compile-changes-7*
|
COMPILE TIME CHANGES *compile-changes-7*
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" These commands create the option window.
|
" These commands create the option window.
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2004 Jul 02
|
" Last Change: 2004 Jul 03
|
||||||
|
|
||||||
" If there already is an option window, jump to that one.
|
" If there already is an option window, jump to that one.
|
||||||
if bufwinnr("option-window") > 0
|
if bufwinnr("option-window") > 0
|
||||||
@ -359,6 +359,11 @@ call <SID>OptionG("lcs", &lcs)
|
|||||||
call append("$", "number\tshow the line number for each line")
|
call append("$", "number\tshow the line number for each line")
|
||||||
call append("$", "\t(local to window)")
|
call append("$", "\t(local to window)")
|
||||||
call <SID>BinOptionL("nu")
|
call <SID>BinOptionL("nu")
|
||||||
|
if has("linebreak")
|
||||||
|
call append("$", "numberwidth\tnumber of columns to use for the line number")
|
||||||
|
call append("$", "\t(local to window)")
|
||||||
|
call <SID>OptionL("nuw")
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
call <SID>Header("syntax and highlighting")
|
call <SID>Header("syntax and highlighting")
|
||||||
|
11
src/Makefile
11
src/Makefile
@ -497,7 +497,7 @@ CClink = $(CC)
|
|||||||
#CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wmissing-prototypes
|
#CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wmissing-prototypes
|
||||||
#CFLAGS = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
|
#CFLAGS = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
|
||||||
#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
|
#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
|
||||||
#CFLAGS = -g -O2 -DSTARTUPTIME=\"vimstartup\" -fno-strength-reduce -Wall -Wmissing-prototypes
|
#CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
|
||||||
|
|
||||||
# EFENCE - Electric-Fence malloc debugging: catches memory accesses beyond
|
# EFENCE - Electric-Fence malloc debugging: catches memory accesses beyond
|
||||||
# allocated memory (and makes every malloc()/free() very slow).
|
# allocated memory (and makes every malloc()/free() very slow).
|
||||||
@ -1492,8 +1492,11 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
|
|||||||
|
|
||||||
# Use "make reconfig" to rerun configure without cached values.
|
# Use "make reconfig" to rerun configure without cached values.
|
||||||
# When config.h changes, most things will be recompiled automatically.
|
# When config.h changes, most things will be recompiled automatically.
|
||||||
# Use "myself" to make "all" with a possibly changed auto/config.mk.
|
# Invoke $(MAKE) to run config with the empty auto/config.mk.
|
||||||
reconfig: scratch clean config myself
|
# Invoke $(MAKE) to build all with the filled auto/config.mk.
|
||||||
|
reconfig: scratch clean
|
||||||
|
$(MAKE) -f Makefile config
|
||||||
|
$(MAKE) -f Makefile all
|
||||||
|
|
||||||
# Run autoconf to produce auto/configure.
|
# Run autoconf to produce auto/configure.
|
||||||
# Note:
|
# Note:
|
||||||
@ -2413,9 +2416,11 @@ objects/gui_kde_widget.o: gui_kde_widget.cc
|
|||||||
$(KDE_DIR)/bin/dcopidl2cpp --c++-suffix cc --no-stub kvim_iface.kidl
|
$(KDE_DIR)/bin/dcopidl2cpp --c++-suffix cc --no-stub kvim_iface.kidl
|
||||||
$(CCC) -o $@ gui_kde_widget.cc
|
$(CCC) -o $@ gui_kde_widget.cc
|
||||||
|
|
||||||
|
gui_kde_widget_moc.cc: objects/gui_kde_widget.o
|
||||||
objects/gui_kde_widget_moc.o: gui_kde_widget_moc.cc
|
objects/gui_kde_widget_moc.o: gui_kde_widget_moc.cc
|
||||||
$(CCC) -o $@ gui_kde_widget_moc.cc
|
$(CCC) -o $@ gui_kde_widget_moc.cc
|
||||||
|
|
||||||
|
kvim_iface_skel.cc: objects/gui_kde_widget.o
|
||||||
objects/kvim_iface_skel.o: kvim_iface_skel.cc
|
objects/kvim_iface_skel.o: kvim_iface_skel.cc
|
||||||
$(CCC) -o $@ kvim_iface_skel.cc
|
$(CCC) -o $@ kvim_iface_skel.cc
|
||||||
|
|
||||||
|
628
src/auto/configure
vendored
628
src/auto/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -993,6 +993,7 @@ dnl Skip everything by default.
|
|||||||
SKIP_GTK=YES
|
SKIP_GTK=YES
|
||||||
SKIP_GTK2=YES
|
SKIP_GTK2=YES
|
||||||
SKIP_GNOME=YES
|
SKIP_GNOME=YES
|
||||||
|
SKIP_KDE=YES
|
||||||
SKIP_MOTIF=YES
|
SKIP_MOTIF=YES
|
||||||
SKIP_ATHENA=YES
|
SKIP_ATHENA=YES
|
||||||
SKIP_NEXTAW=YES
|
SKIP_NEXTAW=YES
|
||||||
|
@ -1956,11 +1956,11 @@ print_line_no_prefix(lnum, use_number)
|
|||||||
linenr_T lnum;
|
linenr_T lnum;
|
||||||
int use_number;
|
int use_number;
|
||||||
{
|
{
|
||||||
char_u numbuf[20];
|
char_u numbuf[30];
|
||||||
|
|
||||||
if (curwin->w_p_nu || use_number)
|
if (curwin->w_p_nu || use_number)
|
||||||
{
|
{
|
||||||
sprintf((char *)numbuf, "%7ld ", (long)lnum);
|
sprintf((char *)numbuf, "%*ld ", number_width(curwin), (long)lnum);
|
||||||
msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
|
msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
|
||||||
}
|
}
|
||||||
msg_prt_line(ml_get(lnum));
|
msg_prt_line(ml_get(lnum));
|
||||||
|
@ -3974,6 +3974,7 @@ ExpandUserDefined(xp, regmatch, num_file, file)
|
|||||||
char_u num[50];
|
char_u num[50];
|
||||||
garray_T ga;
|
garray_T ga;
|
||||||
int save_current_SID = current_SID;
|
int save_current_SID = current_SID;
|
||||||
|
struct cmdline_info save_ccline;
|
||||||
|
|
||||||
if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0')
|
if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0')
|
||||||
return FAIL;
|
return FAIL;
|
||||||
@ -3987,9 +3988,17 @@ ExpandUserDefined(xp, regmatch, num_file, file)
|
|||||||
args[1] = ccline.cmdbuff;
|
args[1] = ccline.cmdbuff;
|
||||||
args[2] = num;
|
args[2] = num;
|
||||||
|
|
||||||
|
/* Save the cmdline, we don't know what the function may do. */
|
||||||
|
save_ccline = ccline;
|
||||||
|
ccline.cmdbuff = NULL;
|
||||||
|
ccline.cmdprompt = NULL;
|
||||||
current_SID = xp->xp_scriptID;
|
current_SID = xp->xp_scriptID;
|
||||||
|
|
||||||
all = call_vim_function(xp->xp_arg, 3, args, FALSE);
|
all = call_vim_function(xp->xp_arg, 3, args, FALSE);
|
||||||
|
|
||||||
|
ccline = save_ccline;
|
||||||
current_SID = save_current_SID;
|
current_SID = save_current_SID;
|
||||||
|
|
||||||
ccline.cmdbuff[ccline.cmdlen] = keep;
|
ccline.cmdbuff[ccline.cmdlen] = keep;
|
||||||
if (all == NULL)
|
if (all == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
@ -246,6 +246,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* +linebreak 'showbreak', 'breakat' and 'linebreak' options.
|
* +linebreak 'showbreak', 'breakat' and 'linebreak' options.
|
||||||
|
* Also 'numberwidth'.
|
||||||
*/
|
*/
|
||||||
#ifdef FEAT_NORMAL
|
#ifdef FEAT_NORMAL
|
||||||
# define FEAT_LINEBREAK
|
# define FEAT_LINEBREAK
|
||||||
|
205
src/gui_mac.c
205
src/gui_mac.c
@ -203,6 +203,16 @@ ControlActionUPP gScrollDrag;
|
|||||||
/* Keeping track of which scrollbar is being dragged */
|
/* Keeping track of which scrollbar is being dragged */
|
||||||
static ControlHandle dragged_sb = NULL;
|
static ControlHandle dragged_sb = NULL;
|
||||||
|
|
||||||
|
#if defined(USE_CARBONIZED) && defined(MACOS_X)
|
||||||
|
static struct
|
||||||
|
{
|
||||||
|
FMFontFamily family;
|
||||||
|
FMFontSize size;
|
||||||
|
FMFontStyle style;
|
||||||
|
Boolean isPanelVisible;
|
||||||
|
} gFontPanelInfo = { 0, 0, 0, false };
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The Quickdraw global is predefined in CodeWarior
|
* The Quickdraw global is predefined in CodeWarior
|
||||||
* but is not in Apple MPW
|
* but is not in Apple MPW
|
||||||
@ -1436,6 +1446,99 @@ InstallAEHandlers(void)
|
|||||||
}
|
}
|
||||||
#endif /* USE_AEVENT */
|
#endif /* USE_AEVENT */
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(USE_CARBONIZED) && defined(MACOS_X)
|
||||||
|
/*
|
||||||
|
* Callback function, installed by InstallFontPanelHandler(), below,
|
||||||
|
* to handle Font Panel events.
|
||||||
|
*/
|
||||||
|
static OSStatus
|
||||||
|
FontPanelHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent,
|
||||||
|
void *inUserData)
|
||||||
|
{
|
||||||
|
if (GetEventKind(inEvent) == kEventFontPanelClosed)
|
||||||
|
{
|
||||||
|
gFontPanelInfo.isPanelVisible = false;
|
||||||
|
return noErr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetEventKind(inEvent) == kEventFontSelection)
|
||||||
|
{
|
||||||
|
OSStatus status;
|
||||||
|
FMFontFamily newFamily;
|
||||||
|
FMFontSize newSize;
|
||||||
|
FMFontStyle newStyle;
|
||||||
|
|
||||||
|
/* Retrieve the font family ID number. */
|
||||||
|
status = GetEventParameter(inEvent, kEventParamFMFontFamily,
|
||||||
|
/*inDesiredType=*/typeFMFontFamily, /*outActualType=*/NULL,
|
||||||
|
/*inBufferSize=*/sizeof(FMFontFamily), /*outActualSize=*/NULL,
|
||||||
|
&newFamily);
|
||||||
|
if (status == noErr)
|
||||||
|
gFontPanelInfo.family = newFamily;
|
||||||
|
|
||||||
|
/* Retrieve the font size. */
|
||||||
|
status = GetEventParameter(inEvent, kEventParamFMFontSize,
|
||||||
|
typeFMFontSize, NULL, sizeof(FMFontSize), NULL, &newSize);
|
||||||
|
if (status == noErr)
|
||||||
|
gFontPanelInfo.size = newSize;
|
||||||
|
|
||||||
|
/* Retrieve the font style (bold, etc.). Currently unused. */
|
||||||
|
status = GetEventParameter(inEvent, kEventParamFMFontStyle,
|
||||||
|
typeFMFontStyle, NULL, sizeof(FMFontStyle), NULL, &newStyle);
|
||||||
|
if (status == noErr)
|
||||||
|
gFontPanelInfo.style = newStyle;
|
||||||
|
}
|
||||||
|
return noErr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
InstallFontPanelHandler()
|
||||||
|
{
|
||||||
|
EventTypeSpec eventTypes[2];
|
||||||
|
EventHandlerUPP handlerUPP;
|
||||||
|
/* EventHandlerRef handlerRef; */
|
||||||
|
|
||||||
|
eventTypes[0].eventClass = kEventClassFont;
|
||||||
|
eventTypes[0].eventKind = kEventFontSelection;
|
||||||
|
eventTypes[1].eventClass = kEventClassFont;
|
||||||
|
eventTypes[1].eventKind = kEventFontPanelClosed;
|
||||||
|
|
||||||
|
handlerUPP = NewEventHandlerUPP(FontPanelHandler);
|
||||||
|
|
||||||
|
InstallApplicationEventHandler(handlerUPP, /*numTypes=*/2, eventTypes,
|
||||||
|
/*userData=*/NULL, /*handlerRef=*/NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fill the buffer pointed to by outName with the name and size
|
||||||
|
* of the font currently selected in the Font Panel.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
GetFontPanelSelection(char_u* outName)
|
||||||
|
{
|
||||||
|
Str255 buf;
|
||||||
|
Boolean isBold = false, isItalic = false;
|
||||||
|
|
||||||
|
if (!outName)
|
||||||
|
return;
|
||||||
|
|
||||||
|
(void)FMGetFontFamilyName(gFontPanelInfo.family, buf);
|
||||||
|
p2cstrcpy(outName, buf);
|
||||||
|
|
||||||
|
#if 0 /* TODO: enable when styles are supported in gui_mac_find_font() */
|
||||||
|
isBold = (gFontPanelInfo.style & bold);
|
||||||
|
isItalic = (gFontPanelInfo.style & italic);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sprintf(&outName[buf[0]], ":h%d%s%s", gFontPanelInfo.size,
|
||||||
|
(isBold ? ":b" : ""), (isItalic ? ":i" : ""));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------------
|
* ------------------------------------------------------------
|
||||||
* Unfiled yet
|
* Unfiled yet
|
||||||
@ -2614,6 +2717,28 @@ gui_mac_find_font(font_name)
|
|||||||
*p = c;
|
*p = c;
|
||||||
|
|
||||||
GetFNum(pFontName, &font_id);
|
GetFNum(pFontName, &font_id);
|
||||||
|
|
||||||
|
if (font_id == 0)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Try again, this time replacing underscores in the font name
|
||||||
|
* with spaces (:set guifont allows the two to be used
|
||||||
|
* interchangeably; the Font Manager doesn't).
|
||||||
|
*/
|
||||||
|
int i, changed = FALSE;
|
||||||
|
|
||||||
|
for (i = pFontName[0]; i > 0; --i)
|
||||||
|
{
|
||||||
|
if (pFontName[i] == '_')
|
||||||
|
{
|
||||||
|
pFontName[i] = ' ';
|
||||||
|
changed = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (changed)
|
||||||
|
GetFNum(pFontName, &font_id);
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* name = C2Pascal_save(menu->dname); */
|
/* name = C2Pascal_save(menu->dname); */
|
||||||
fontNamePtr = C2Pascal_save_and_remove_backslash(font_name);
|
fontNamePtr = C2Pascal_save_and_remove_backslash(font_name);
|
||||||
@ -3002,6 +3127,11 @@ gui_mch_init()
|
|||||||
gScrollDrag = NewControlActionProc(gui_mac_drag_thumb);
|
gScrollDrag = NewControlActionProc(gui_mac_drag_thumb);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_CARBONIZED) && defined(MACOS_X)
|
||||||
|
/* Install Carbon event callbacks. */
|
||||||
|
(void)InstallFontPanelHandler();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Getting a handle to the Help menu */
|
/* Getting a handle to the Help menu */
|
||||||
#ifdef USE_HELPMENU
|
#ifdef USE_HELPMENU
|
||||||
# ifdef USE_CARBONIZED
|
# ifdef USE_CARBONIZED
|
||||||
@ -3233,6 +3363,56 @@ gui_mch_get_screen_dimensions(screen_w, screen_h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(USE_CARBONIZED) && defined(MACOS_X)
|
||||||
|
/*
|
||||||
|
* Open the Font Panel and wait for the user to select a font and
|
||||||
|
* close the panel. Then fill the buffer pointed to by font_name with
|
||||||
|
* the name and size of the selected font and return the font's handle,
|
||||||
|
* or NOFONT in case of an error.
|
||||||
|
*/
|
||||||
|
static GuiFont
|
||||||
|
gui_mac_select_font(char_u *font_name)
|
||||||
|
{
|
||||||
|
GuiFont selected_font = NOFONT;
|
||||||
|
OSStatus status;
|
||||||
|
FontSelectionQDStyle curr_font;
|
||||||
|
|
||||||
|
/* Initialize the Font Panel with the current font. */
|
||||||
|
curr_font.instance.fontFamily = gui.norm_font & 0xFFFF;
|
||||||
|
curr_font.size = (gui.norm_font >> 16);
|
||||||
|
/* TODO: set fontStyle once styles are supported in gui_mac_find_font() */
|
||||||
|
curr_font.instance.fontStyle = 0;
|
||||||
|
curr_font.hasColor = false;
|
||||||
|
curr_font.version = 0; /* version number of the style structure */
|
||||||
|
status = SetFontInfoForSelection(kFontSelectionQDType,
|
||||||
|
/*numStyles=*/1, &curr_font, /*eventTarget=*/NULL);
|
||||||
|
|
||||||
|
gFontPanelInfo.family = curr_font.instance.fontFamily;
|
||||||
|
gFontPanelInfo.style = curr_font.instance.fontStyle;
|
||||||
|
gFontPanelInfo.size = curr_font.size;
|
||||||
|
|
||||||
|
/* Pop up the Font Panel. */
|
||||||
|
status = FPShowHideFontPanel();
|
||||||
|
if (status == noErr)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The Font Panel is modeless. We really need it to be modal,
|
||||||
|
* so we spin in an event loop until the panel is closed.
|
||||||
|
*/
|
||||||
|
gFontPanelInfo.isPanelVisible = true;
|
||||||
|
while (gFontPanelInfo.isPanelVisible)
|
||||||
|
{
|
||||||
|
EventRecord e;
|
||||||
|
WaitNextEvent(everyEvent, &e, /*sleep=*/20, /*mouseRgn=*/NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetFontPanelSelection(font_name);
|
||||||
|
selected_font = gui_mac_find_font(font_name);
|
||||||
|
}
|
||||||
|
return selected_font;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise vim to use the font with the given name. Return FAIL if the font
|
* Initialise vim to use the font with the given name. Return FAIL if the font
|
||||||
@ -3262,6 +3442,31 @@ gui_mch_init_font(font_name, fontset)
|
|||||||
}
|
}
|
||||||
font = (suggestedSize << 16) + ((long) font_id & 0xFFFF);
|
font = (suggestedSize << 16) + ((long) font_id & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
#if defined(USE_CARBONIZED) && defined(MACOS_X)
|
||||||
|
else if (STRCMP(font_name, "*") == 0)
|
||||||
|
{
|
||||||
|
char_u *new_p_guifont, font_name[512];
|
||||||
|
|
||||||
|
font = gui_mac_select_font(font_name);
|
||||||
|
if (font == NOFONT)
|
||||||
|
return FAIL;
|
||||||
|
|
||||||
|
/* Set guifont to the name of the selected font. */
|
||||||
|
new_p_guifont = alloc(STRLEN(font_name) + 1);
|
||||||
|
if (new_p_guifont != NULL)
|
||||||
|
{
|
||||||
|
STRCPY(new_p_guifont, font_name);
|
||||||
|
vim_free(p_guifont);
|
||||||
|
p_guifont = new_p_guifont;
|
||||||
|
/* Replace spaces in the font name with underscores. */
|
||||||
|
for ( ; *new_p_guifont; ++new_p_guifont)
|
||||||
|
{
|
||||||
|
if (*new_p_guifont == ' ')
|
||||||
|
*new_p_guifont = '_';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
font = gui_mac_find_font(font_name);
|
font = gui_mac_find_font(font_name);
|
||||||
|
@ -243,3 +243,8 @@
|
|||||||
/* Whether to draw the vertical bar on the right side of the cell. */
|
/* Whether to draw the vertical bar on the right side of the cell. */
|
||||||
# define CURSOR_BAR_RIGHT (curwin->w_p_rl && (!(State & CMDLINE) || cmdmsg_rl))
|
# define CURSOR_BAR_RIGHT (curwin->w_p_rl && (!(State & CMDLINE) || cmdmsg_rl))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef FEAT_LINEBREAK
|
||||||
|
/* Without the 'numberwidth' option line numbers are always 7 chars. */
|
||||||
|
# define number_width(x) 7
|
||||||
|
#endif
|
||||||
|
@ -257,6 +257,9 @@ ml_open()
|
|||||||
curbuf->b_ml.ml_mfp = mfp;
|
curbuf->b_ml.ml_mfp = mfp;
|
||||||
curbuf->b_ml.ml_flags = ML_EMPTY;
|
curbuf->b_ml.ml_flags = ML_EMPTY;
|
||||||
curbuf->b_ml.ml_line_count = 1;
|
curbuf->b_ml.ml_line_count = 1;
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
curwin->w_nrwidth_line_count = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MSDOS) && !defined(DJGPP)
|
#if defined(MSDOS) && !defined(DJGPP)
|
||||||
/* for 16 bit MS-DOS create a swapfile now, because we run out of
|
/* for 16 bit MS-DOS create a swapfile now, because we run out of
|
||||||
|
@ -892,7 +892,7 @@ validate_cursor_col()
|
|||||||
win_col_off(wp)
|
win_col_off(wp)
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
{
|
{
|
||||||
return ((wp->w_p_nu ? 8 : 0)
|
return ((wp->w_p_nu ? number_width(wp) + 1 : 0)
|
||||||
#ifdef FEAT_CMDWIN
|
#ifdef FEAT_CMDWIN
|
||||||
+ (cmdwin_type == 0 || wp != curwin ? 0 : 1)
|
+ (cmdwin_type == 0 || wp != curwin ? 0 : 1)
|
||||||
#endif
|
#endif
|
||||||
@ -925,7 +925,7 @@ win_col_off2(wp)
|
|||||||
win_T *wp;
|
win_T *wp;
|
||||||
{
|
{
|
||||||
if (wp->w_p_nu && vim_strchr(p_cpo, CPO_NUMCOL) != NULL)
|
if (wp->w_p_nu && vim_strchr(p_cpo, CPO_NUMCOL) != NULL)
|
||||||
return 8;
|
return number_width(wp) + 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
36
src/option.c
36
src/option.c
@ -106,6 +106,7 @@ typedef enum
|
|||||||
, PV_MPS
|
, PV_MPS
|
||||||
, PV_NF
|
, PV_NF
|
||||||
, PV_NU
|
, PV_NU
|
||||||
|
, PV_NUW
|
||||||
, PV_OFT
|
, PV_OFT
|
||||||
, PV_PATH
|
, PV_PATH
|
||||||
, PV_PI
|
, PV_PI
|
||||||
@ -1546,6 +1547,13 @@ static struct vimoption
|
|||||||
{"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
|
{"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
|
||||||
(char_u *)VAR_WIN, PV_NU,
|
(char_u *)VAR_WIN, PV_NU,
|
||||||
{(char_u *)FALSE, (char_u *)0L}},
|
{(char_u *)FALSE, (char_u *)0L}},
|
||||||
|
{"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
(char_u *)VAR_WIN, PV_NUW,
|
||||||
|
#else
|
||||||
|
(char_u *)NULL, PV_NONE,
|
||||||
|
#endif
|
||||||
|
{(char_u *)8L, (char_u *)4L}},
|
||||||
{"open", NULL, P_BOOL|P_VI_DEF,
|
{"open", NULL, P_BOOL|P_VI_DEF,
|
||||||
(char_u *)NULL, PV_NONE,
|
(char_u *)NULL, PV_NONE,
|
||||||
{(char_u *)FALSE, (char_u *)0L}},
|
{(char_u *)FALSE, (char_u *)0L}},
|
||||||
@ -1598,7 +1606,7 @@ static struct vimoption
|
|||||||
{"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
|
{"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
|
||||||
(char_u *)&p_pi, PV_PI,
|
(char_u *)&p_pi, PV_PI,
|
||||||
{(char_u *)FALSE, (char_u *)0L}},
|
{(char_u *)FALSE, (char_u *)0L}},
|
||||||
{"previewheight", "pvh",P_NUM|P_VI_DEF,
|
{"previewheight", "pvh", P_NUM|P_VI_DEF,
|
||||||
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
|
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
|
||||||
(char_u *)&p_pvh, PV_NONE,
|
(char_u *)&p_pvh, PV_NONE,
|
||||||
#else
|
#else
|
||||||
@ -6631,7 +6639,7 @@ set_num_option(opt_idx, varp, value, errbuf, opt_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ifdef FEAT_VERTSPLIT
|
# ifdef FEAT_VERTSPLIT
|
||||||
if (pp == &p_wiw)
|
else if (pp == &p_wiw)
|
||||||
{
|
{
|
||||||
if (p_wiw < 1)
|
if (p_wiw < 1)
|
||||||
{
|
{
|
||||||
@ -6809,6 +6817,24 @@ set_num_option(opt_idx, varp, value, errbuf, opt_flags)
|
|||||||
p_ul = value;
|
p_ul = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
/* 'numberwidth' must be positive */
|
||||||
|
else if (pp == &curwin->w_p_nuw)
|
||||||
|
{
|
||||||
|
if (curwin->w_p_nuw < 1)
|
||||||
|
{
|
||||||
|
errmsg = e_positive;
|
||||||
|
curwin->w_p_nuw = 1;
|
||||||
|
}
|
||||||
|
if (curwin->w_p_nuw > 10)
|
||||||
|
{
|
||||||
|
errmsg = e_invarg;
|
||||||
|
curwin->w_p_nuw = 10;
|
||||||
|
}
|
||||||
|
curwin->w_nrwidth_line_count = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check the bounds for numeric options here
|
* Check the bounds for numeric options here
|
||||||
*/
|
*/
|
||||||
@ -7857,6 +7883,9 @@ get_varp(p)
|
|||||||
case PV_FMR: return (char_u *)&(curwin->w_p_fmr);
|
case PV_FMR: return (char_u *)&(curwin->w_p_fmr);
|
||||||
#endif
|
#endif
|
||||||
case PV_NU: return (char_u *)&(curwin->w_p_nu);
|
case PV_NU: return (char_u *)&(curwin->w_p_nu);
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
case PV_NUW: return (char_u *)&(curwin->w_p_nuw);
|
||||||
|
#endif
|
||||||
#if defined(FEAT_WINDOWS)
|
#if defined(FEAT_WINDOWS)
|
||||||
case PV_WFH: return (char_u *)&(curwin->w_p_wfh);
|
case PV_WFH: return (char_u *)&(curwin->w_p_wfh);
|
||||||
#endif
|
#endif
|
||||||
@ -8025,6 +8054,9 @@ copy_winopt(from, to)
|
|||||||
#endif
|
#endif
|
||||||
to->wo_list = from->wo_list;
|
to->wo_list = from->wo_list;
|
||||||
to->wo_nu = from->wo_nu;
|
to->wo_nu = from->wo_nu;
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
to->wo_nuw = from->wo_nuw;
|
||||||
|
#endif
|
||||||
#ifdef FEAT_RIGHTLEFT
|
#ifdef FEAT_RIGHTLEFT
|
||||||
to->wo_rl = from->wo_rl;
|
to->wo_rl = from->wo_rl;
|
||||||
to->wo_rlc = vim_strsave(from->wo_rlc);
|
to->wo_rlc = vim_strsave(from->wo_rlc);
|
||||||
|
@ -43,4 +43,5 @@ void unshowmode __ARGS((int force));
|
|||||||
int redrawing __ARGS((void));
|
int redrawing __ARGS((void));
|
||||||
int messaging __ARGS((void));
|
int messaging __ARGS((void));
|
||||||
void showruler __ARGS((int always));
|
void showruler __ARGS((int always));
|
||||||
|
int number_width __ARGS((win_T *wp));
|
||||||
/* vim: set ft=c : */
|
/* vim: set ft=c : */
|
||||||
|
68
src/screen.c
68
src/screen.c
@ -415,6 +415,13 @@ update_screen(type)
|
|||||||
if (clear_cmdline) /* going to clear cmdline (done below) */
|
if (clear_cmdline) /* going to clear cmdline (done below) */
|
||||||
check_for_delay(FALSE);
|
check_for_delay(FALSE);
|
||||||
|
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
/* Force redraw when width of 'number' column changes. */
|
||||||
|
if (curwin->w_redr_type < NOT_VALID
|
||||||
|
&& curwin->w_nrwidth != number_width(curwin))
|
||||||
|
curwin->w_redr_type = NOT_VALID;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Only start redrawing if there is really something to do.
|
* Only start redrawing if there is really something to do.
|
||||||
*/
|
*/
|
||||||
@ -822,6 +829,17 @@ win_update(wp)
|
|||||||
search_hl.first_lnum = 0;
|
search_hl.first_lnum = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
/* Force redraw when width of 'number' column changes. */
|
||||||
|
i = number_width(curwin);
|
||||||
|
if (curwin->w_nrwidth != i)
|
||||||
|
{
|
||||||
|
type = NOT_VALID;
|
||||||
|
curwin->w_nrwidth = i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
|
||||||
if (buf->b_mod_set && buf->b_mod_xlines != 0 && wp->w_redraw_top != 0)
|
if (buf->b_mod_set && buf->b_mod_xlines != 0 && wp->w_redraw_top != 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -2101,9 +2119,11 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
|
|||||||
len = W_WIDTH(wp) - col;
|
len = W_WIDTH(wp) - col;
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
if (len > 8)
|
int w = number_width(wp);
|
||||||
len = 8;
|
|
||||||
sprintf((char *)buf, "%7ld ", (long)lnum);
|
if (len > w + 1)
|
||||||
|
len = w + 1;
|
||||||
|
sprintf((char *)buf, "%*ld ", w, (long)lnum);
|
||||||
#ifdef FEAT_RIGHTLEFT
|
#ifdef FEAT_RIGHTLEFT
|
||||||
if (wp->w_p_rl)
|
if (wp->w_p_rl)
|
||||||
/* the line number isn't reversed */
|
/* the line number isn't reversed */
|
||||||
@ -3073,7 +3093,8 @@ win_line(wp, lnum, startrow, endrow)
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sprintf((char *)extra, "%7ld ", (long)lnum);
|
sprintf((char *)extra, "%*ld ",
|
||||||
|
number_width(wp), (long)lnum);
|
||||||
if (wp->w_skipcol > 0)
|
if (wp->w_skipcol > 0)
|
||||||
for (p_extra = extra; *p_extra == ' '; ++p_extra)
|
for (p_extra = extra; *p_extra == ' '; ++p_extra)
|
||||||
*p_extra = '-';
|
*p_extra = '-';
|
||||||
@ -3086,7 +3107,7 @@ win_line(wp, lnum, startrow, endrow)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
c_extra = ' ';
|
c_extra = ' ';
|
||||||
n_extra = 8;
|
n_extra = number_width(wp) + 1;
|
||||||
char_attr = hl_attr(HLF_N);
|
char_attr = hl_attr(HLF_N);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8457,3 +8478,40 @@ win_redr_ruler(wp, always)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(FEAT_LINEBREAK) || defined(PROTO)
|
||||||
|
/*
|
||||||
|
* Return the width of the 'number' column.
|
||||||
|
* Zero when 'number' isn't set.
|
||||||
|
* Otherwise it depends on 'numberwidth' and the line count.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
number_width(wp)
|
||||||
|
win_T *wp;
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
linenr_T lnum;
|
||||||
|
|
||||||
|
if (!wp->w_p_nu)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
lnum = wp->w_buffer->b_ml.ml_line_count;
|
||||||
|
if (lnum == wp->w_nrwidth_line_count)
|
||||||
|
return wp->w_nrwidth_width;
|
||||||
|
wp->w_nrwidth_line_count = lnum;
|
||||||
|
|
||||||
|
n = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
lnum /= 10;
|
||||||
|
++n;
|
||||||
|
} while (lnum > 0);
|
||||||
|
|
||||||
|
/* 'numberwidth' gives the minimal width plus one */
|
||||||
|
if (n < wp->w_p_nuw - 1)
|
||||||
|
n = wp->w_p_nuw - 1;
|
||||||
|
|
||||||
|
wp->w_nrwidth_width = n;
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -169,6 +169,10 @@ typedef struct
|
|||||||
#define w_p_list w_onebuf_opt.wo_list /* 'list' */
|
#define w_p_list w_onebuf_opt.wo_list /* 'list' */
|
||||||
int wo_nu;
|
int wo_nu;
|
||||||
#define w_p_nu w_onebuf_opt.wo_nu /* 'number' */
|
#define w_p_nu w_onebuf_opt.wo_nu /* 'number' */
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
long wo_nuw;
|
||||||
|
# define w_p_nuw w_onebuf_opt.wo_nuw /* 'numberwidth' */
|
||||||
|
#endif
|
||||||
#if defined(FEAT_WINDOWS)
|
#if defined(FEAT_WINDOWS)
|
||||||
int wo_wfh;
|
int wo_wfh;
|
||||||
# define w_p_wfh w_onebuf_opt.wo_wfh /* 'winfixheight' */
|
# define w_p_wfh w_onebuf_opt.wo_wfh /* 'winfixheight' */
|
||||||
@ -1470,6 +1474,9 @@ struct window
|
|||||||
char w_foldinvalid; /* when TRUE: folding needs to be
|
char w_foldinvalid; /* when TRUE: folding needs to be
|
||||||
recomputed */
|
recomputed */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
int w_nrwidth; /* width of 'number' column being used */
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* === end of cached values ===
|
* === end of cached values ===
|
||||||
@ -1578,6 +1585,11 @@ struct window
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
scrollbar_T w_scrollbars[2]; /* vert. Scrollbars for this window */
|
scrollbar_T w_scrollbars[2]; /* vert. Scrollbars for this window */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
linenr_T w_nrwidth_line_count; /* line count when ml_nrwidth_width
|
||||||
|
* was computed. */
|
||||||
|
int w_nrwidth_width; /* nr of chars to print line count. */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_PERL
|
#ifdef FEAT_PERL
|
||||||
void *perl_private;
|
void *perl_private;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user