mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a9348a1b9 | |||
| 4d9b1a2c01 | |||
| 1a8a544a61 | |||
| 5d9c7ebdfc | |||
| def7b1dc61 | |||
| 2b926fcb3c | |||
| 60d0871000 | |||
| c7f08b7ee1 | |||
| 164251ff80 | |||
| 976b847f43 | |||
| e85c90d810 | |||
| 21f990e1c2 | |||
| ef73a28401 | |||
| d473c8c101 | |||
| f53c692240 | |||
| b0acacd767 | |||
| b31a3acce1 | |||
| 51e9fbf1c7 | |||
| d569bb0299 | |||
| 90f1e2b7bc | |||
| dae7a8964c | |||
| f66ad538c3 | |||
| 027327ab58 | |||
| ee8415bc59 | |||
| 0ee81cb638 | |||
| 02ae96681a | |||
| d0807a4aff | |||
| efe03738f6 | |||
| 4b16ee743e | |||
| 1598f9937a | |||
| 38efd1d17a | |||
| 4d37557ac6 | |||
| 3f347e4716 | |||
| af559d2c9f | |||
| bfde0b482d | |||
| 9fa9506853 | |||
| f8f88f89e1 | |||
| 980bab457e | |||
| 40385dbcdf | |||
| de3b3677f7 | |||
| b782ba475a | |||
| b1cf16113f | |||
| 7ebf4e1c34 | |||
| 8d8a65e389 | |||
| 447bd5a346 | |||
| ee380ae376 | |||
| 91d2e783b4 | |||
| 917e32bda5 | |||
| 5db7eec423 | |||
| 02ab97709d | |||
| 7cc596547a | |||
| 60c26e028a | |||
| 3cb4448b8a | |||
| 218beb3e96 | |||
| 7da1fb5532 | |||
| 87ea64ca96 | |||
| 82593c1a3a |
@@ -35,6 +35,7 @@ script:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
- ./configure $CONFOPT --enable-fail-if-missing
|
||||
- cat src/auto/config.mk
|
||||
- cat src/auto/config.h
|
||||
- grep -q -- "-DDYNAMIC_PERL_DLL=\\\\\"$vi_cv_dll_name_perl\\\\\"" src/auto/config.mk
|
||||
- grep -q -- "-DDYNAMIC_PYTHON_DLL=\\\\\"$vi_cv_dll_name_python\\\\\"" src/auto/config.mk
|
||||
- grep -q -- "-DDYNAMIC_PYTHON3_DLL=\\\\\"$vi_cv_dll_name_python3\\\\\"" src/auto/config.mk
|
||||
|
||||
@@ -661,7 +661,7 @@ DirChanged The working directory has changed in response
|
||||
to the |:cd| or |:lcd| commands, or as a
|
||||
result of the 'autochdir' option.
|
||||
The pattern can be:
|
||||
"window" to trigger on `:lcd
|
||||
"window" to trigger on `:lcd`
|
||||
"global" to trigger on `:cd`
|
||||
"auto" to trigger on 'autochdir'.
|
||||
"drop" to trigger on editing a file
|
||||
|
||||
@@ -1447,7 +1447,7 @@ to the name of an external program for Vim to use for text formatting. The
|
||||
program.
|
||||
|
||||
*format-formatexpr*
|
||||
The 'formatexpr' option can be set to a Vim Script function that performs
|
||||
The 'formatexpr' option can be set to a Vim script function that performs
|
||||
reformatting of the buffer. This should usually happen in an |ftplugin|,
|
||||
since formatting is highly dependent on the type of file. It makes
|
||||
sense to use an |autoload| script, so the corresponding script is only loaded
|
||||
@@ -1481,7 +1481,7 @@ text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
|
||||
|
||||
You can then enable the formatting by executing: >
|
||||
setlocal formatexpr=format#Format()
|
||||
>
|
||||
|
||||
Note: this function explicitly returns non-zero when called from insert mode
|
||||
(which basically means, text is inserted beyond the 'textwidth' limit). This
|
||||
causes Vim to fall back to reformat the text by using the internal formatter.
|
||||
|
||||
@@ -384,12 +384,16 @@ Example (this does almost the same as 'diffexpr' being empty): >
|
||||
endif
|
||||
silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new .
|
||||
\ " > " . v:fname_out
|
||||
redraw!
|
||||
endfunction
|
||||
|
||||
The "-a" argument is used to force comparing the files as text, comparing as
|
||||
binaries isn't useful. The "--binary" argument makes the files read in binary
|
||||
mode, so that a CTRL-Z doesn't end the text on DOS.
|
||||
|
||||
The `redraw!` command may not be needed, depending on whether executing a
|
||||
shell command shows something on the display or not.
|
||||
|
||||
*E810* *E97*
|
||||
Vim will do a test if the diff output looks alright. If it doesn't, you will
|
||||
get an error message. Possible causes:
|
||||
|
||||
@@ -2111,7 +2111,7 @@ cursor({list}) Number move cursor to position in {list}
|
||||
debugbreak({pid}) Number interrupt process being debugged
|
||||
deepcopy({expr} [, {noref}]) any make a full copy of {expr}
|
||||
delete({fname} [, {flags}]) Number delete the file or directory {fname}
|
||||
deletebufline({expr}, {first}[, {last}])
|
||||
deletebufline({expr}, {first} [, {last}])
|
||||
Number delete lines from buffer {expr}
|
||||
did_filetype() Number |TRUE| if FileType autocmd event used
|
||||
diff_filler({lnum}) Number diff filler lines about {lnum}
|
||||
@@ -2477,7 +2477,7 @@ tolower({expr}) String the String {expr} switched to lowercase
|
||||
toupper({expr}) String the String {expr} switched to uppercase
|
||||
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||
to chars in {tostr}
|
||||
trim({text}[, {mask}]) String trim characters in {mask} from {text}
|
||||
trim({text} [, {mask}]) String trim characters in {mask} from {text}
|
||||
trunc({expr}) Float truncate Float {expr}
|
||||
type({name}) Number type of variable {name}
|
||||
undofile({name}) String undo file name for {name}
|
||||
@@ -3529,7 +3529,7 @@ delete({fname} [, {flags}]) *delete()*
|
||||
To delete a line from the buffer use |:delete| or
|
||||
|deletebufline()|.
|
||||
|
||||
deletebufline({expr}, {first}[, {last}]) *deletebufline()*
|
||||
deletebufline({expr}, {first} [, {last}]) *deletebufline()*
|
||||
Delete lines {first} to {last} (inclusive) from buffer {expr}.
|
||||
If {last} is omitted then delete line {first} only.
|
||||
On success 0 is returned, on failure 1 is returned.
|
||||
@@ -4307,7 +4307,7 @@ getbufinfo([{dict}])
|
||||
endfor
|
||||
<
|
||||
To get buffer-local options use: >
|
||||
getbufvar({bufnr}, '&')
|
||||
getbufvar({bufnr}, '&option_name')
|
||||
|
||||
<
|
||||
*getbufline()*
|
||||
@@ -8591,9 +8591,8 @@ term_start({cmd}, {options}) *term_start()*
|
||||
|job-options|. However, not all options can be used. These
|
||||
are supported:
|
||||
all timeout options
|
||||
"stoponexit"
|
||||
"callback", "out_cb", "err_cb"
|
||||
"exit_cb", "close_cb"
|
||||
"stoponexit", "cwd", "env"
|
||||
"callback", "out_cb", "err_cb", "exit_cb", "close_cb"
|
||||
"in_io", "in_top", "in_bot", "in_name", "in_buf"
|
||||
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
|
||||
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
|
||||
@@ -8837,7 +8836,7 @@ tr({src}, {fromstr}, {tostr}) *tr()*
|
||||
echo tr("<blob>", "<>", "{}")
|
||||
< returns "{blob}"
|
||||
|
||||
trim({text}[, {mask}]) *trim()*
|
||||
trim({text} [, {mask}]) *trim()*
|
||||
Return {text} as a String where any character in {mask} is
|
||||
removed from the beginning and end of {text}.
|
||||
If {mask} is not given, {mask} is all characters up to 0x20,
|
||||
|
||||
@@ -236,4 +236,4 @@ It also has a few other mappings:
|
||||
Note: This binding is only available in MacVim.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:sw=4:noet:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -838,4 +838,4 @@ page.
|
||||
Solution: ~
|
||||
Post your question on the |vim_mac| mailing list and wait for an answer.
|
||||
|
||||
vim:tw=78:sw=4:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -595,9 +595,9 @@ Virtual Replace mode Virtual Replace mode is similar to Replace mode, but
|
||||
If the 'showmode' option is on "-- VREPLACE --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
Insert Normal mode Entered when CTRL-O given in Insert mode. This is
|
||||
like Normal mode, but after executing one command Vim
|
||||
returns to Insert mode.
|
||||
Insert Normal mode Entered when CTRL-O is typed in Insert mode (see
|
||||
|i_CTRL-O|). This is like Normal mode, but after
|
||||
executing one command Vim returns to Insert mode.
|
||||
If the 'showmode' option is on "-- (insert) --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
|
||||
+25
-13
@@ -1059,6 +1059,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
name, precede it with a backslash.
|
||||
- To include a comma in a directory name precede it with a backslash.
|
||||
- A directory name may end in an '/'.
|
||||
- For Unix and Win32, if a directory ends in two path separators "//",
|
||||
the swap file name will be built from the complete path to the file
|
||||
with all path separators changed to percent '%' signs. This will
|
||||
ensure file name uniqueness in the backup directory.
|
||||
On Win32, it is also possible to end with "\\". However, When a
|
||||
separating comma is following, you must use "//", since "\\" will
|
||||
include the comma in the file name. Therefore it is recommended to
|
||||
use '//', instead of '\\'.
|
||||
- Environment variables are expanded |:set_env|.
|
||||
- Careful with '\' characters, type one before a space, type two to
|
||||
get one in the option (see |option-backslash|), for example: >
|
||||
@@ -2703,12 +2711,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
|
||||
put the swap file relative to where the edited file is. The leading
|
||||
"." is replaced with the path name of the edited file.
|
||||
- For Unix and Win32, if a directory ends in two path separators "//"
|
||||
or "\\", the swap file name will be built from the complete path to
|
||||
the file with all path separators substituted to percent '%' signs.
|
||||
This will ensure file name uniqueness in the preserve directory.
|
||||
On Win32, when a separating comma is following, you must use "//",
|
||||
since "\\" will include the comma in the file name.
|
||||
- For Unix and Win32, if a directory ends in two path separators "//",
|
||||
the swap file name will be built from the complete path to the file
|
||||
with all path separators substituted to percent '%' signs. This will
|
||||
ensure file name uniqueness in the preserve directory.
|
||||
On Win32, it is also possible to end with "\\". However, When a
|
||||
separating comma is following, you must use "//", since "\\" will
|
||||
include the comma in the file name. Therefore it is recommended to
|
||||
use '//', instead of '\\'.
|
||||
- Spaces after the comma are ignored, other spaces are considered part
|
||||
of the directory name. To have a space at the start of a directory
|
||||
name, precede it with a backslash.
|
||||
@@ -4486,7 +4496,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
methods. Use 'imdisable' to disable XIM then.
|
||||
|
||||
You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
|
||||
via external command if vim is not compiled with the |+xim|,
|
||||
via external command if Vim is not compiled with the |+xim|,
|
||||
|+multi_byte_ime| or |global-ime|.
|
||||
|
||||
*'imsearch'* *'ims'*
|
||||
@@ -4593,6 +4603,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
so far, matches. The matched string is highlighted. If the pattern
|
||||
is invalid or not found, nothing is shown. The screen will be updated
|
||||
often, this is only useful on fast terminals.
|
||||
Also applies to the `:s`, `:g` and `:v` commands.
|
||||
Note that the match will be shown, but the cursor will return to its
|
||||
original position when no match is found and when pressing <Esc>. You
|
||||
still need to finish the search command with <Enter> to move the
|
||||
@@ -4606,9 +4617,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The highlighting can be set with the 'i' flag in 'highlight'.
|
||||
When 'hlsearch' is on, all matched strings are highlighted too while
|
||||
typing a search command. See also: 'hlsearch'.
|
||||
If you don't want turn 'hlsearch' on, but want to highlight all matches
|
||||
while searching, you can turn on and off 'hlsearch' with autocmd.
|
||||
Example: >
|
||||
If you don't want to turn 'hlsearch' on, but want to highlight all
|
||||
matches while searching, you can turn on and off 'hlsearch' with
|
||||
autocmd. Example: >
|
||||
augroup vimrc-incsearch-highlight
|
||||
autocmd!
|
||||
autocmd CmdlineEnter /,\? :set hlsearch
|
||||
@@ -6801,7 +6812,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
tabpages all tab pages; without this only the current tab page
|
||||
is restored, so that you can make a session for each
|
||||
tab page separately
|
||||
terminal include terminal windows where the command can be restored
|
||||
terminal include terminal windows where the command can be
|
||||
restored
|
||||
unix with Unix end-of-line format (single <NL>), even when
|
||||
on Windows or DOS
|
||||
winpos position of the whole Vim window
|
||||
@@ -6837,7 +6849,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Example with escaped space (Vim will do this when initializing the
|
||||
option from $SHELL): >
|
||||
:set shell=/bin/with\\\ space/sh
|
||||
< The resulting value of 'shell' is "/bin/with\ space/sh", two
|
||||
< The resulting value of 'shell' is "/bin/with\ space/sh", two
|
||||
backslashes are consumed by `:set`.
|
||||
|
||||
Under MS-Windows, when the executable ends in ".com" it must be
|
||||
@@ -7663,7 +7675,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
line is displayed. The current buffer and current window will be set
|
||||
temporarily to that of the window (and buffer) whose statusline is
|
||||
currently being drawn. The expression will evaluate in this context.
|
||||
The variable "actual_curbuf" is set to the 'bufnr()' number of the
|
||||
The variable "g:actual_curbuf" is set to the `bufnr()` number of the
|
||||
real current buffer.
|
||||
|
||||
The 'statusline' option will be evaluated in the |sandbox| if set from
|
||||
|
||||
@@ -135,4 +135,4 @@ Todo:
|
||||
- Replace usage of fork() with spawn() when launching external
|
||||
programs.
|
||||
|
||||
vim:tw=78:sw=4:ts=8:noet:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -46,6 +46,8 @@ Note: If you have problems printing with |:hardcopy|, an alternative is to use
|
||||
'printexpr' through |v:cmdarg|. Otherwise [arguments]
|
||||
is ignored. 'printoptions' can be used to specify
|
||||
paper size, duplex, etc.
|
||||
Note: If you want PDF, there are tools such as
|
||||
"ps2pdf" that can convert the PostScript to PDF.
|
||||
|
||||
:[range]ha[rdcopy][!] >{filename}
|
||||
As above, but write the resulting PostScript in file
|
||||
|
||||
@@ -46,7 +46,7 @@ compiler (see |errorformat| below).
|
||||
|
||||
*quickfix-ID*
|
||||
Each quickfix list has a unique identifier called the quickfix ID and this
|
||||
number will not change within a Vim session. The getqflist() function can be
|
||||
number will not change within a Vim session. The |getqflist()| function can be
|
||||
used to get the identifier assigned to a list. There is also a quickfix list
|
||||
number which may change whenever more than ten lists are added to a quickfix
|
||||
stack.
|
||||
@@ -68,7 +68,7 @@ the location list is destroyed.
|
||||
Every quickfix and location list has a read-only changedtick variable that
|
||||
tracks the total number of changes made to the list. Every time the quickfix
|
||||
list is modified, this count is incremented. This can be used to perform an
|
||||
action only when the list has changed. The getqflist() and getloclist()
|
||||
action only when the list has changed. The |getqflist()| and |getloclist()|
|
||||
functions can be used to query the current value of changedtick. You cannot
|
||||
change the changedtick variable.
|
||||
|
||||
@@ -602,7 +602,7 @@ present). Examples: >
|
||||
echo getloclist(2, {'winid' : 1}).winid
|
||||
<
|
||||
*getqflist-examples*
|
||||
The getqflist() and getloclist() functions can be used to get the various
|
||||
The |getqflist()| and |getloclist()| functions can be used to get the various
|
||||
attributes of a quickfix and location list respectively. Some examples for
|
||||
using these functions are below:
|
||||
>
|
||||
@@ -659,7 +659,7 @@ using these functions are below:
|
||||
:echo getloclist(3, {'winid' : 0}).winid
|
||||
<
|
||||
*setqflist-examples*
|
||||
The setqflist() and setloclist() functions can be used to set the various
|
||||
The |setqflist()| and |setloclist()| functions can be used to set the various
|
||||
attributes of a quickfix and location list respectively. Some examples for
|
||||
using these functions are below:
|
||||
>
|
||||
|
||||
@@ -487,7 +487,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
|
||||
When {vimrc} is equal to "DEFAULTS" (all uppercase), this has
|
||||
the same effect as "NONE", but the |defaults.vim| script is
|
||||
loaded, which will also set 'nocompatible'.
|
||||
loaded, which will also set 'nocompatible'. Also see
|
||||
|--clean|.
|
||||
|
||||
Using the "-u" argument with another argument than DEFAULTS
|
||||
has the side effect that the 'compatible' option will be on by
|
||||
@@ -520,7 +521,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
'nocompatible': use Vim defaults
|
||||
- no |gvimrc| script is loaded
|
||||
- no viminfo file is read or written
|
||||
- the home directory is excluded from 'runtimepath'
|
||||
|
||||
*-x*
|
||||
-x Use encryption to read/write files. Will prompt for a key,
|
||||
which is then stored in the 'key' option. All writes will
|
||||
|
||||
@@ -241,8 +241,10 @@ REORDERING TAB PAGES:
|
||||
:tabm[ove] [N] *:tabm* *:tabmove*
|
||||
:[N]tabm[ove]
|
||||
Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. Without N the tab
|
||||
page is made the last one. >
|
||||
make the current tab page the first one. N is counted before
|
||||
the move, thus if the second tab is the current one,
|
||||
`:tabmove 1`` and `:tabmove 2` have no effect.
|
||||
Without N the tab page is made the last one. >
|
||||
:.tabmove " do nothing
|
||||
:-tabmove " move the tab page to the left
|
||||
:+tabmove " move the tab page to the right
|
||||
|
||||
@@ -1009,13 +1009,17 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
't_RF' term.txt /*'t_RF'*
|
||||
't_RI' term.txt /*'t_RI'*
|
||||
't_RS' term.txt /*'t_RS'*
|
||||
't_RT' term.txt /*'t_RT'*
|
||||
't_RV' term.txt /*'t_RV'*
|
||||
't_Ri' term.txt /*'t_Ri'*
|
||||
't_SC' term.txt /*'t_SC'*
|
||||
't_SH' term.txt /*'t_SH'*
|
||||
't_SI' term.txt /*'t_SI'*
|
||||
't_SR' term.txt /*'t_SR'*
|
||||
't_ST' term.txt /*'t_ST'*
|
||||
't_Sb' term.txt /*'t_Sb'*
|
||||
't_Sf' term.txt /*'t_Sf'*
|
||||
't_Si' term.txt /*'t_Si'*
|
||||
't_Te' term.txt /*'t_Te'*
|
||||
't_Ts' term.txt /*'t_Ts'*
|
||||
't_VS' term.txt /*'t_VS'*
|
||||
@@ -8844,13 +8848,17 @@ t_RC term.txt /*t_RC*
|
||||
t_RF term.txt /*t_RF*
|
||||
t_RI term.txt /*t_RI*
|
||||
t_RS term.txt /*t_RS*
|
||||
t_RT term.txt /*t_RT*
|
||||
t_RV term.txt /*t_RV*
|
||||
t_Ri term.txt /*t_Ri*
|
||||
t_SC term.txt /*t_SC*
|
||||
t_SH term.txt /*t_SH*
|
||||
t_SI term.txt /*t_SI*
|
||||
t_SR term.txt /*t_SR*
|
||||
t_ST term.txt /*t_ST*
|
||||
t_Sb term.txt /*t_Sb*
|
||||
t_Sf term.txt /*t_Sf*
|
||||
t_Si term.txt /*t_Si*
|
||||
t_Te term.txt /*t_Te*
|
||||
t_Ts term.txt /*t_Ts*
|
||||
t_VS term.txt /*t_VS*
|
||||
|
||||
@@ -352,6 +352,10 @@ Added by Vim (there are no standard codes for these):
|
||||
t_SH set cursor shape *t_SH* *'t_SH'*
|
||||
t_RC request terminal cursor blinking *t_RC* *'t_RC'*
|
||||
t_RS request terminal cursor style *t_RS* *'t_RS'*
|
||||
t_ST save window title to stack *t_ST* *'t_ST'*
|
||||
t_RT restore window title from stack *t_RT* *'t_RT'*
|
||||
t_Si save icon text to stack *t_Si* *'t_Si'*
|
||||
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
by the termcap option, the middle part is text.
|
||||
|
||||
@@ -635,7 +635,7 @@ Starting ~
|
||||
Load the plugin with this command: >
|
||||
packadd termdebug
|
||||
< *:Termdebug*
|
||||
To start debugging use `:Termdebug` or `:TermdebugCommand`` followed by the
|
||||
To start debugging use `:Termdebug` or `:TermdebugCommand` followed by the
|
||||
command name, for example: >
|
||||
:Termdebug vim
|
||||
|
||||
|
||||
+65
-86
@@ -34,12 +34,10 @@ entered there will not be repeated below, unless there is extra information.
|
||||
|
||||
The #1234 numbers refer to an issue or pull request on github. To see it in a
|
||||
browser use: https://github.com/vim/vim/issues/1234
|
||||
|
||||
(replace 1234 with the issue/pull number)
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Graduate FEAT_VREPLACE, it's not much code and a lot of #ifdefs
|
||||
|
||||
Prompt buffer:
|
||||
- Add a command line history.
|
||||
- delay next prompt until plugin gives OK?
|
||||
@@ -76,13 +74,40 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
|
||||
|
||||
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
|
||||
#2546) Fixes #1057. Missing a test.
|
||||
|
||||
Problem with quickfix giving E42 when filtering the error list.
|
||||
(Nobuhiro Takasaki, 2018 Aug 1, #3270)
|
||||
Patch with test from Yegappan, Aug 2.
|
||||
|
||||
Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
|
||||
Maybe not needed?
|
||||
|
||||
Patch in issue 3268, fix suggestion window appearing on wrong screen.
|
||||
Also from Ken Takata, 2018 Aug 2.
|
||||
|
||||
Patch for Lua support. (Kazunobu Kuriyama, 2018 May 26)
|
||||
|
||||
Patch to use NGETTEXT() in many more places. (Sergey Alyoshin, 2018 May 25)
|
||||
Updated patch May 27.
|
||||
|
||||
Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
|
||||
|
||||
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
|
||||
|
||||
Issue #686: apply 'F' in 'shortmess' to more messages. Also #3221.
|
||||
Patch on #3221 from Christian. Does it work now?
|
||||
|
||||
Patch to include a cfilter plugin to filter quickfix/location lists.
|
||||
(Yegappan Lakshmanan, 2018 May 12)
|
||||
|
||||
Does not build with MinGW out of the box:
|
||||
- _stat64 is not defined, need to use "struct stat" in vim.h
|
||||
- WINVER conflict, should use 0x0600 by default?
|
||||
|
||||
Patches for Python: #3162, #3263 (Ozaki Kiichi)
|
||||
Needs update.
|
||||
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
@@ -98,6 +123,12 @@ Include part of #3242?
|
||||
|
||||
Inlcude Chinese-Taiwan translations. (bystar, #3261)
|
||||
|
||||
Completion mixes results from the current buffer with tags and other files.
|
||||
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
|
||||
terminal.c and then CTRL-N twice.
|
||||
Should do current file first and not split it up when more results are found.
|
||||
(Also #1890)
|
||||
|
||||
Using mouse for inputlist() doesn't work after patch 8.0.1756. (Dominique
|
||||
Pelle, 2018 Jul 22, #3239) Also see 8.0.0722. Check both console and GUI.
|
||||
|
||||
@@ -150,9 +181,18 @@ Memory leak in test_terminal:
|
||||
|
||||
gethostbyname() is old, use getaddrinfo() if available. (#3227)
|
||||
|
||||
Delete the src/main.aap file?
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
|
||||
|
||||
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
|
||||
|
||||
Set g:actual_curbuf when evaluating 'statusline', not just with an expression.
|
||||
(Daniel Hahler, 2018 Aug 8, #3299)
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
@@ -160,16 +200,6 @@ modified buffers
|
||||
skip "badd fname" if "fname" is already in the buffer list
|
||||
remove remark about unloading buffers from documentation
|
||||
|
||||
Patch to make :help work for tags with a ?. (Hirohito Higashi, 2018 May 28)
|
||||
|
||||
Patch to have a stack trace in Ruby. (Masataka Pocke Kuwabara, 2018 Jul 30,
|
||||
#3267)
|
||||
|
||||
Patch to adjust to DPI setting for GTK. (Roel van de Kraats, 2017 Nov 20,
|
||||
#2357)
|
||||
|
||||
Patch to fix window size when using VTP. (Nobuhiro Takasaki, #3164)
|
||||
|
||||
Compiler warnings (geeknik, 2017 Oct 26):
|
||||
- signed integer overflow in do_sub() (#2249)
|
||||
- signed integer overflow in get_address() (#2248)
|
||||
@@ -179,8 +209,6 @@ Compiler warnings (geeknik, 2017 Oct 26):
|
||||
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
|
||||
characters. (#3246)
|
||||
|
||||
Patch for more quickfix refactoring. (Yegappan Lakshmanan, #2950)
|
||||
|
||||
Tests failing for "make testgui" with GTK:
|
||||
- Test_setbufvar_options()
|
||||
- Test_exit_callback_interval()
|
||||
@@ -190,17 +218,6 @@ is cleared, to avoid going back to the list of errors buffer (would have two
|
||||
windows with it). Can we just remove the jump list entries for the quickfix
|
||||
buffer?
|
||||
|
||||
Patch to stack and pop the window title and icon. (IWAMOTO Kouichi, 2018 Jun
|
||||
22, #3059)
|
||||
8 For xterm need to open a connection to the X server to get the window
|
||||
title, which can be slow. Can also get the title with "<Esc>[21t", no
|
||||
need to use X11 calls. This returns "<Esc>]l{title}<Esc>\".
|
||||
Using title stack probably works better.
|
||||
|
||||
When a function is defined in the sandbox (with :function or as a lambda)
|
||||
always execute it in the sandbox. (#3182)
|
||||
Remove "safe" argument from call_vim_function(), it's always FALSE.
|
||||
|
||||
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
|
||||
#2948. (related to #1512?)
|
||||
On Win32 it stops showing, because showState is already ShS_SHOWING.
|
||||
@@ -222,8 +239,6 @@ used for git temp files.
|
||||
|
||||
Cursor in wrong position when line wraps. (#2540)
|
||||
|
||||
Patch for Lua support. (Kazunobu Kuriyama, 2018 May 26)
|
||||
|
||||
Make {skip} argument of searchpair() consistent with other places where we
|
||||
pass an expression to evaluate. Allow passing zero for "never skip".
|
||||
|
||||
@@ -233,8 +248,6 @@ script or function.
|
||||
Universal solution to detect if t_RS is working, using cursor position.
|
||||
Koichi Iwamoto, #2126
|
||||
|
||||
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
|
||||
|
||||
When using a menu item while the "more" prompt is displayed doesn't work well.
|
||||
E.g. after using help->version. Have a key that ends the "more" prompt and
|
||||
does nothing otherwise?
|
||||
@@ -268,9 +281,6 @@ How to test that it works well for all Vim users?
|
||||
|
||||
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
|
||||
|
||||
Patch to use NGETTEXT() in many more places. (Sergey Alyoshin, 2018 May 25)
|
||||
Updated ptach May 27.
|
||||
|
||||
Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
|
||||
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
|
||||
Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
|
||||
@@ -304,18 +314,14 @@ confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
|
||||
|
||||
Add the debug command line history to viminfo.
|
||||
|
||||
Issue #686: apply 'F' in 'shortmess' to more messages. Also #3221.
|
||||
|
||||
Avoid that "sign unplace id" does a redraw right away, esp. when there is a
|
||||
sequence of these commands. (Andy Stewart, 2018 Mar 16)
|
||||
|
||||
ch_sendraw() with long string does not try to read in between, which may cause
|
||||
a deadlock if the reading side is waiting for the write to finish. (Nate
|
||||
Bosch, 2018 Jan 13, #2548)
|
||||
Perhaps just make chunks of 1024 bytes?
|
||||
|
||||
Patch to include a cfilter plugin to filter quickfix/location lists.
|
||||
(Yegappan Lakshmanan, 2018 May 12)
|
||||
Perhaps just make chunks of 1024 bytes? Make the write non-blocking?
|
||||
Also a problem on MS-Windows: #2828.
|
||||
|
||||
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
|
||||
Will have to explain the manual steps (downloading the .aff and .dic files,
|
||||
@@ -335,8 +341,6 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
Using 'wildignore' also applies to literally entered file name. Also with
|
||||
:drop (remote commands).
|
||||
|
||||
Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
|
||||
|
||||
Inserting a line in a CompleteDone autocommand may confuse undo. (micbou,
|
||||
2018 Jun 18, #3027)
|
||||
|
||||
@@ -377,23 +381,21 @@ crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
|
||||
#2546) Fixes #1057. Missing a test.
|
||||
|
||||
":file" does not show anything when 'shortmess' contains 'F'. (#3070)
|
||||
|
||||
Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
|
||||
|
||||
No profile information for function that executes ":quit". (Daniel Hahler,
|
||||
2017 Dec 26, #2501)
|
||||
|
||||
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
|
||||
|
||||
A function defined locally and lambda's are not easily recognized.
|
||||
Mention where they were defined somewhere.
|
||||
|
||||
Get a "No Name" buffer when 'hidden' is set and opening a new window from the
|
||||
quickfix list. (bfrg, 2018 Jan 22, #2574)
|
||||
|
||||
CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746)
|
||||
|
||||
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
|
||||
|
||||
Invalid range error when using BufWinLeave for closing terminal.
|
||||
(Gabriel Barta, 2017 Nov 15, #2339)
|
||||
|
||||
@@ -404,8 +406,8 @@ Olaf Dabrunz is working on this. (10 Jan 2016)
|
||||
9 Instead invoking an external diff program, use builtin code. One can be
|
||||
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
|
||||
It's complicated and badly documented.
|
||||
Alternative: use the xdiff library. Patch from Christian Brabandt, 2018 Mar
|
||||
20, #2732)
|
||||
Alternative: use the xdiff library. Unfinished Patch from Christian Brabandt,
|
||||
2018 Mar 20, #2732)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
@@ -450,9 +452,6 @@ always nested.
|
||||
|
||||
matchit hasn't been maintained for a long time. #955.
|
||||
|
||||
Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
|
||||
Maybe not needed?
|
||||
|
||||
Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
|
||||
|
||||
MS-Windows: buffer completion doesn't work when using backslash (or slash)
|
||||
@@ -554,12 +553,6 @@ that optiona? (Bjorn Linse, 2017 Aug 5)
|
||||
Cindent: returning a structure has more indent for the second item.
|
||||
(Sam Pagenkopf, 2017 Sep 14, #2090)
|
||||
|
||||
Completion mixes results from the current buffer with tags and other files.
|
||||
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
|
||||
terminal.c and then CTRL-N twice.
|
||||
Should do current file first and not split it up when more results are found.
|
||||
(Also #1890)
|
||||
|
||||
Patch from Christian Brabandt to preserve upper case marks when wiping out a
|
||||
buffer. (2013 Dec 9)
|
||||
Also fixes #2166?
|
||||
@@ -1277,12 +1270,6 @@ Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
|
||||
|
||||
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
|
||||
|
||||
Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
|
||||
2015 Feb 6.
|
||||
|
||||
Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
|
||||
Is this a good solution?
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
@@ -1300,8 +1287,6 @@ Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
|
||||
Updated patch by Roland Eggner, Dec 16
|
||||
Updated patch from Charles, 2016 Jul 2
|
||||
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
|
||||
Patch for building a 32bit Vim with 64bit MingW compiler.
|
||||
(Michael Soyka, 2014 Oct 15)
|
||||
|
||||
@@ -1872,13 +1857,6 @@ Ruby: ":ruby print $buffer.number" returns zero.
|
||||
|
||||
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
|
||||
|
||||
7 The 'directory' option supports changing path separators to "%" to make
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
Patch by Christian Brabandt, 2010 Oct 21.
|
||||
Is this an update: related to: #179
|
||||
https://github.com/chrisbra/vim-mq-patches/blob/master/backupdir
|
||||
Fixed patch 2017 Jul 1.
|
||||
|
||||
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
2010 Oct 24)
|
||||
|
||||
@@ -1974,9 +1952,6 @@ Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
Patch to use 'foldnestmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
|
||||
Jan 7)
|
||||
|
||||
Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
|
||||
Only with "vim -u NONE".
|
||||
|
||||
Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8)
|
||||
|
||||
With 'wildmode' set to "longest:full,full" and pressing Tab once the first
|
||||
@@ -3452,8 +3427,6 @@ Macintosh:
|
||||
'magic' in history. (Margo)
|
||||
9 optwin.vim: Restoring a mapping for <Space> or <CR> is not correct for
|
||||
":noremap". Add "mapcmd({string}, {mode})? Use code from ":mkexrc".
|
||||
9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
|
||||
isn't updated).
|
||||
9 term_console is used before it is set (msdos, Amiga).
|
||||
9 Get out-of-memory for ":g/^/,$s//@/" on 1000 lines, this is not handled
|
||||
correctly. Get many error messages while redrawing the screen, which
|
||||
@@ -5229,16 +5202,22 @@ Mappings and Abbreviations:
|
||||
|
||||
|
||||
Incsearch:
|
||||
- Add a limit to the number of lines that are searched for 'incsearch'?
|
||||
- Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014
|
||||
Dec 4. Is this a good solution?
|
||||
- Temporarily open folds to show where the search ends up. Restore the
|
||||
folds when going to another line.
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
- Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
|
||||
Only with "vim -u NONE".
|
||||
- When no match is found and the user types more, the screen is redrawn
|
||||
anyway. Could skip that. Esp. if the line wraps and the text is scrolled
|
||||
up every time.
|
||||
- Temporarily open folds to show where the search ends up. Restore the
|
||||
folds when going to another line.
|
||||
- When incsearch used and hitting return, no need to search again in many
|
||||
cases, saves a lot of time in big files. (Slootman wants to work on this?)
|
||||
When not using special characters, can continue search from the last match
|
||||
(or not at all, when there was no match). See oldmail/webb/in.872.
|
||||
9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
|
||||
isn't updated).
|
||||
|
||||
|
||||
Searching:
|
||||
@@ -6152,5 +6131,5 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
|
||||
@@ -285,4 +285,4 @@ Address to send checks to:
|
||||
|
||||
This address is expected to be valid for a long time.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -403,4 +403,4 @@ if it is not what you want do 'u.'. This will remove the contents of the
|
||||
first put, and repeat the put command for the second register. Repeat the
|
||||
'u.' until you got what you want.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -189,4 +189,4 @@ donate part of the profit to help AIDS victims in Uganda. See |iccf|.
|
||||
|
||||
Next chapter: |usr_02.txt| The first steps in Vim
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -698,4 +698,4 @@ Summary: *help-summary* >
|
||||
|
||||
Next chapter: |usr_03.txt| Moving around
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -654,4 +654,4 @@ You will notice a few special marks. These include:
|
||||
|
||||
Next chapter: |usr_04.txt| Making small changes
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -511,4 +511,4 @@ else:
|
||||
|
||||
Next chapter: |usr_05.txt| Set your settings
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -664,4 +664,4 @@ This does mean there is less room to edit text, thus it's a compromise.
|
||||
|
||||
Next chapter: |usr_06.txt| Using syntax highlighting
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -277,4 +277,4 @@ others look at the colored text.
|
||||
|
||||
Next chapter: |usr_07.txt| Editing more than one file
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -476,4 +476,4 @@ This protects you from accidentally overwriting another file.
|
||||
|
||||
Next chapter: |usr_08.txt| Splitting windows
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -598,4 +598,4 @@ For more information about tab pages see |tab-page|.
|
||||
|
||||
Next chapter: |usr_09.txt| Using the GUI
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -287,4 +287,4 @@ You can tune the way Select mode works with the 'selectmode' option.
|
||||
|
||||
Next chapter: |usr_10.txt| Making big changes
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -821,4 +821,4 @@ has written. To tell Vim to redraw the screen: >
|
||||
|
||||
Next chapter: |usr_11.txt| Recovering from a crash
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -304,4 +304,4 @@ For remarks about encryption and the swap file, see |:recover-crypt|.
|
||||
|
||||
Next chapter: |usr_12.txt| Clever tricks
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -355,4 +355,4 @@ matches and where they are.
|
||||
|
||||
Next chapter: |usr_20.txt| Typing command-line commands quickly
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -381,4 +381,4 @@ there can be only one.
|
||||
|
||||
Next chapter: |usr_21.txt| Go away and come back
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -496,4 +496,4 @@ For more details see |modeline|.
|
||||
|
||||
Next chapter: |usr_22.txt| Finding the file to edit
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -397,4 +397,4 @@ can't be editing nothing!
|
||||
|
||||
Next chapter: |usr_23.txt| Editing other files
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -340,4 +340,4 @@ decompression. You might need to install the programs first.
|
||||
|
||||
Next chapter: |usr_24.txt| Inserting quickly
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -603,4 +603,4 @@ This deletes up to the third word into register g.
|
||||
|
||||
Next chapter: |usr_25.txt| Editing formatted text
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -579,4 +579,4 @@ The "gR" command uses Virtual Replace mode. This preserves the layout:
|
||||
|
||||
Next chapter: |usr_26.txt| Repeating
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -218,4 +218,4 @@ start all over, use the "-W" argument. It overwrites any existing file.
|
||||
|
||||
Next chapter: |usr_27.txt| Search commands and patterns
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -560,4 +560,4 @@ and "\w" for "[0-9A-Za-z_]".
|
||||
|
||||
Next chapter: |usr_28.txt| Folding
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -423,4 +423,4 @@ the defined folds. Then you can delete or add folds manually.
|
||||
|
||||
Next chapter: |usr_29.txt| Moving through programs
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -608,4 +608,4 @@ for the identifier. Example (cursor on "idx"):
|
||||
|
||||
Next chapter: |usr_30.txt| Editing programs
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -640,4 +640,4 @@ For more details see |format-comments|.
|
||||
|
||||
Next chapter: |usr_31.txt| Exploiting the GUI
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -269,4 +269,4 @@ another font size, for example.
|
||||
|
||||
Next chapter: |usr_32.txt| The undo tree
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -177,4 +177,4 @@ use the |undotree()| function. To see what it returns: >
|
||||
|
||||
Next chapter: |usr_40.txt| Make new commands
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -654,4 +654,4 @@ To set it back to the normal behavior, make 'eventignore' empty: >
|
||||
|
||||
Next chapter: |usr_41.txt| Write a Vim script
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -2592,4 +2592,4 @@ It's good if you add a line to allow automatic updating. See |glvs-plugins|.
|
||||
|
||||
Next chapter: |usr_42.txt| Add new menus
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -362,4 +362,4 @@ is...
|
||||
|
||||
Next chapter: |usr_43.txt| Using filetypes
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -176,4 +176,4 @@ and sources a script or executes a function to check the contents of the file.
|
||||
|
||||
Next chapter: |usr_44.txt| Your own syntax highlighted
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -716,4 +716,4 @@ up scrolling backwards and CTRL-L.
|
||||
|
||||
Next chapter: |usr_45.txt| Select your language
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -416,4 +416,4 @@ Don't type the spaces. See |i_CTRL-V_digit| for the details.
|
||||
|
||||
Next chapter: |usr_90.txt| Installing Vim
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -495,4 +495,4 @@ files that you created. You might want to keep that.
|
||||
|
||||
Table of contents: |usr_toc.txt|
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -352,4 +352,4 @@ Before you can use Vim.
|
||||
|
||||
==============================================================================
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -352,4 +352,4 @@ this and accidentally hit CTRL-B, it is very difficult to find out how to undo
|
||||
it. Since hardly anybody uses this feature, it is disabled by default. If
|
||||
you want to use it, define RIGHTLEFT in feature.h before compiling. |'revins'|
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -7810,4 +7810,4 @@ Solution: Allocate the buffer for the shell command.
|
||||
Files: src/ex_docmd.c
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -14527,4 +14527,4 @@ Solution: Don't advance the cursor to include a line break when it's already
|
||||
Files: src/search.c
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -18311,4 +18311,4 @@ Files: src/os_win32.c
|
||||
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -25792,4 +25792,4 @@ Solution: Move the todo items to the help file.
|
||||
Files: src/terminal.c
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1021,4 +1021,4 @@ These are remarks about running the POSIX test suite:
|
||||
- ex test 534 fails because .exrc isn't read in silent mode.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -538,4 +538,4 @@ g CTRL-H Start Select mode, blockwise. This is like CTRL-V,
|
||||
but starts Select mode instead of Visual mode.
|
||||
Mnemonic: "get Highlighted".
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1311,4 +1311,4 @@ unlisted The buffer is not in the buffer list. It is not used for
|
||||
:setlocal nobuflisted
|
||||
<
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -95,4 +95,4 @@ the directory /usr/local/xpm and untar the file there you can use the
|
||||
uncommented lines in the Makefile without changing them. If you use another
|
||||
xpm directory you will need to change the XPM_DIR in src/Makefile.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -586,7 +586,7 @@ au BufNewFile,BufRead auto.master setf conf
|
||||
au BufNewFile,BufRead *.mas,*.master setf master
|
||||
|
||||
" Forth
|
||||
au BufNewFile,BufRead *.fs,*.ft setf forth
|
||||
au BufNewFile,BufRead *.fs,*.ft,*.fth setf forth
|
||||
|
||||
" Reva Forth
|
||||
au BufNewFile,BufRead *.frt setf reva
|
||||
@@ -1865,6 +1865,9 @@ au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml
|
||||
" ATI graphics driver configuration
|
||||
au BufNewFile,BufRead fglrxrc setf xml
|
||||
|
||||
" Web Services Description Language (WSDL)
|
||||
au BufNewFile,BufRead *.wsdl setf xml
|
||||
|
||||
" XLIFF (XML Localisation Interchange File Format) is also XML
|
||||
au BufNewFile,BufRead *.xlf setf xml
|
||||
au BufNewFile,BufRead *.xliff setf xml
|
||||
|
||||
+233
-135
@@ -1,164 +1,262 @@
|
||||
encoding
|
||||
abolish
|
||||
abolish_category
|
||||
abolish_events
|
||||
abolish_object
|
||||
abolish_protocol
|
||||
abs
|
||||
acos
|
||||
acyclic_term
|
||||
after
|
||||
alias
|
||||
always_true_or_false_goals
|
||||
arg
|
||||
asin
|
||||
asserta
|
||||
assertz
|
||||
atan
|
||||
atan2
|
||||
atom
|
||||
atomic
|
||||
atom_chars
|
||||
atom_chars
|
||||
atom_codes
|
||||
atom_codes
|
||||
atom_concat
|
||||
atom_concat
|
||||
atom_length
|
||||
at_end_of_stream
|
||||
bagof
|
||||
before
|
||||
built_in
|
||||
call
|
||||
callable
|
||||
calls
|
||||
catch
|
||||
category
|
||||
category_property
|
||||
ceiling
|
||||
char_code
|
||||
char_conversion
|
||||
clause
|
||||
clean
|
||||
close
|
||||
code_prefix
|
||||
coinduction
|
||||
coinductive
|
||||
compare
|
||||
complements
|
||||
complements
|
||||
complements_object
|
||||
compound
|
||||
conforms_to_protocol
|
||||
context
|
||||
context_switching_calls
|
||||
copy_term
|
||||
cos
|
||||
create_category
|
||||
create_logtalk_flag
|
||||
create_object
|
||||
create_protocol
|
||||
current_category
|
||||
current_char_conversion
|
||||
current_event
|
||||
current_input
|
||||
current_logtalk_flag
|
||||
current_object
|
||||
current_op
|
||||
current_output
|
||||
current_predicate
|
||||
current_prolog_flag
|
||||
current_protocol
|
||||
debug
|
||||
define_events
|
||||
deprecated
|
||||
discontiguous
|
||||
div
|
||||
domain_error
|
||||
duplicated_directives
|
||||
dynamic
|
||||
dynamic_declarations
|
||||
elif
|
||||
else
|
||||
encoding
|
||||
encoding_directive
|
||||
endif
|
||||
end_category
|
||||
end_object
|
||||
end_protocol
|
||||
info
|
||||
initialization
|
||||
object
|
||||
protocol
|
||||
synchronized
|
||||
threaded
|
||||
uses
|
||||
alias
|
||||
discontiguous
|
||||
meta_predicate
|
||||
mode
|
||||
op
|
||||
private
|
||||
protected
|
||||
public
|
||||
current_object
|
||||
current_protocol
|
||||
current_category
|
||||
object_property
|
||||
protocol_property
|
||||
category_property
|
||||
create_object
|
||||
create_protocol
|
||||
create_category
|
||||
abolish_object
|
||||
abolish_protocol
|
||||
abolish_category
|
||||
complements
|
||||
complements_object
|
||||
engines
|
||||
ensure_loaded
|
||||
evaluation_error
|
||||
events
|
||||
existence_error
|
||||
exp
|
||||
expand_goal
|
||||
expand_term
|
||||
export
|
||||
extends
|
||||
extends_category
|
||||
extends_object
|
||||
extends_protocol
|
||||
extends_category
|
||||
fail
|
||||
false
|
||||
findall
|
||||
float
|
||||
float_fractional_part
|
||||
float_integer_part
|
||||
floor
|
||||
flush_output
|
||||
forall
|
||||
forward
|
||||
functor
|
||||
get_byte
|
||||
get_char
|
||||
get_code
|
||||
goal_expansion
|
||||
ground
|
||||
halt
|
||||
hook
|
||||
if
|
||||
ignore
|
||||
implements
|
||||
implements_protocol
|
||||
imports
|
||||
imports_category
|
||||
include
|
||||
info
|
||||
initialization
|
||||
instantiates
|
||||
instantiates_class
|
||||
specializes
|
||||
specializes_class
|
||||
abolish_events
|
||||
current_event
|
||||
define_events
|
||||
logtalk_load
|
||||
instantiation_error
|
||||
integer
|
||||
keysort
|
||||
lambda_variables
|
||||
log
|
||||
logtalk_compile
|
||||
logtalk_library_path
|
||||
current_logtalk_flag
|
||||
set_logtalk_flag
|
||||
threaded_call
|
||||
threaded_once
|
||||
threaded_ignore
|
||||
threaded_exit
|
||||
threaded_peek
|
||||
threaded_wait
|
||||
threaded_notify
|
||||
self
|
||||
this
|
||||
sender
|
||||
parameter
|
||||
before
|
||||
after
|
||||
phrase
|
||||
expand_term
|
||||
goal_expansion
|
||||
term_expansion
|
||||
true
|
||||
fail
|
||||
call
|
||||
catch
|
||||
throw
|
||||
unify_with_occurs_check
|
||||
var
|
||||
atom
|
||||
integer
|
||||
float
|
||||
atomic
|
||||
compound
|
||||
logtalk_load
|
||||
logtalk_load_context
|
||||
logtalk_make
|
||||
logtalk_make_target_action
|
||||
max
|
||||
meta_non_terminal
|
||||
meta_predicate
|
||||
min
|
||||
missing_directives
|
||||
mod
|
||||
mode
|
||||
modules
|
||||
multifile
|
||||
nl
|
||||
nonvar
|
||||
number
|
||||
arg
|
||||
copy_term
|
||||
functor
|
||||
current_predicate
|
||||
predicate_property
|
||||
abolish
|
||||
assertz
|
||||
asserta
|
||||
clause
|
||||
retract
|
||||
retractall
|
||||
bagof
|
||||
findall
|
||||
forall
|
||||
setof
|
||||
current_input
|
||||
current_output
|
||||
set_input
|
||||
set_output
|
||||
numbervars
|
||||
number_chars
|
||||
number_chars
|
||||
number_codes
|
||||
number_codes
|
||||
object
|
||||
object_property
|
||||
once
|
||||
op
|
||||
open
|
||||
close
|
||||
flush_output
|
||||
stream_property
|
||||
at_end_of_stream
|
||||
set_stream_position
|
||||
get_char
|
||||
get_code
|
||||
optimize
|
||||
parameter
|
||||
peek_byte
|
||||
peek_char
|
||||
peek_code
|
||||
permission_error
|
||||
phrase
|
||||
portability
|
||||
predicate_property
|
||||
private
|
||||
prolog_compatible_version
|
||||
prolog_compiler
|
||||
prolog_dialect
|
||||
prolog_loader
|
||||
prolog_version
|
||||
protected
|
||||
protocol
|
||||
protocol_property
|
||||
public
|
||||
put_byte
|
||||
put_char
|
||||
put_code
|
||||
nl
|
||||
get_byte
|
||||
peek_byte
|
||||
put_byte
|
||||
read
|
||||
read_term
|
||||
redefined_built_ins
|
||||
reexport
|
||||
reload
|
||||
rem
|
||||
repeat
|
||||
report
|
||||
representation_error
|
||||
resource_error
|
||||
retract
|
||||
retractall
|
||||
round
|
||||
scratch_directory
|
||||
self
|
||||
sender
|
||||
setof
|
||||
set_input
|
||||
set_logtalk_flag
|
||||
set_output
|
||||
set_prolog_flag
|
||||
set_stream_position
|
||||
sign
|
||||
sin
|
||||
singleton_variables
|
||||
sort
|
||||
source_data
|
||||
specializes
|
||||
specializes_class
|
||||
sqrt
|
||||
stream_property
|
||||
subsumes_term
|
||||
sub_atom
|
||||
suspicious_calls
|
||||
synchronized
|
||||
syntax_error
|
||||
system_error
|
||||
tabling
|
||||
tan
|
||||
term_expansion
|
||||
term_variables
|
||||
this
|
||||
threaded
|
||||
threaded_call
|
||||
threaded_engine
|
||||
threaded_engine_create
|
||||
threaded_engine_destroy
|
||||
threaded_engine_fetch
|
||||
threaded_engine_next
|
||||
threaded_engine_next_reified
|
||||
threaded_engine_post
|
||||
threaded_engine_self
|
||||
threaded_engine_yield
|
||||
threaded_exit
|
||||
threaded_ignore
|
||||
threaded_notify
|
||||
threaded_once
|
||||
threaded_peek
|
||||
threaded_wait
|
||||
threads
|
||||
throw
|
||||
trivial_goal_fails
|
||||
true
|
||||
truncate
|
||||
type_error
|
||||
undefined_predicates
|
||||
underscore_variables
|
||||
unify_with_occurs_check
|
||||
unknown_entities
|
||||
unknown_predicates
|
||||
uses
|
||||
use_module
|
||||
var
|
||||
version
|
||||
write
|
||||
writeq
|
||||
write_canonical
|
||||
atom_chars
|
||||
atom_codes
|
||||
atom_concat
|
||||
number_chars
|
||||
number_codes
|
||||
current_op
|
||||
char_conversion
|
||||
current_char_conversion
|
||||
once
|
||||
repeat
|
||||
atom_length
|
||||
atom_concat
|
||||
sub_atom
|
||||
atom_chars
|
||||
atom_codes
|
||||
char_code
|
||||
number_chars
|
||||
number_codes
|
||||
set_prolog_flag
|
||||
current_prolog_flag
|
||||
halt
|
||||
abs
|
||||
atan
|
||||
ceiling
|
||||
cos
|
||||
exp
|
||||
float_fractional_part
|
||||
float_integer_part
|
||||
floor
|
||||
log
|
||||
mod
|
||||
rem
|
||||
round
|
||||
sign
|
||||
sin
|
||||
sqrt
|
||||
truncate
|
||||
xor
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Logtalk filetype plugin file
|
||||
" Language: Logtalk
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Latest Revision: 2007-07-06
|
||||
" Latest Revision: 2018-08-03
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -10,9 +10,10 @@ let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl ts< sw< fdm< fdc< ai< dict<"
|
||||
|
||||
"setlocal ts=4
|
||||
setlocal ts=4
|
||||
setlocal sw=4
|
||||
setlocal fdm=syntax
|
||||
setlocal fdn=10
|
||||
setlocal fdc=2
|
||||
setlocal autoindent
|
||||
setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict
|
||||
|
||||
+14
-14
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Dec 05
|
||||
" Last Change: 2018 Aug 07
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -17,19 +17,19 @@ set cpo-=C
|
||||
if !exists('*VimFtpluginUndo')
|
||||
func VimFtpluginUndo()
|
||||
setl fo< isk< com< tw< commentstring<
|
||||
if exists(b:did_add_maps)
|
||||
silent! nunmap <buffer> [['
|
||||
silent! vunmap <buffer> [['
|
||||
silent! nunmap <buffer> ]]'
|
||||
silent! vunmap <buffer> ]]'
|
||||
silent! nunmap <buffer> []'
|
||||
silent! vunmap <buffer> []'
|
||||
silent! nunmap <buffer> ]['
|
||||
silent! vunmap <buffer> ]['
|
||||
silent! nunmap <buffer> ]"'
|
||||
silent! vunmap <buffer> ]"'
|
||||
silent! nunmap <buffer> ["'
|
||||
silent! vunmap <buffer> ["'
|
||||
if exists('b:did_add_maps')
|
||||
silent! nunmap <buffer> [[
|
||||
silent! vunmap <buffer> [[
|
||||
silent! nunmap <buffer> ]]
|
||||
silent! vunmap <buffer> ]]
|
||||
silent! nunmap <buffer> []
|
||||
silent! vunmap <buffer> []
|
||||
silent! nunmap <buffer> ][
|
||||
silent! vunmap <buffer> ][
|
||||
silent! nunmap <buffer> ]"
|
||||
silent! vunmap <buffer> ]"
|
||||
silent! nunmap <buffer> ["
|
||||
silent! vunmap <buffer> ["
|
||||
endif
|
||||
unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps
|
||||
endfunc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Revised on: 2008.06.02
|
||||
" Revised on: 2018.08.04
|
||||
" Language: Logtalk
|
||||
|
||||
" This Logtalk indent file is a modified version of the Prolog
|
||||
@@ -42,6 +42,9 @@ function! GetLogtalkIndent()
|
||||
" Check for clause head on previous line
|
||||
elseif pline =~ ':-\s*\(%.*\)\?$'
|
||||
let ind = ind + shiftwidth()
|
||||
" Check for grammar rule head on previous line
|
||||
elseif pline =~ '-->\s*\(%.*\)\?$'
|
||||
let ind = ind + shiftwidth()
|
||||
" Check for entity closing directive on previous line
|
||||
elseif pline =~ '^\s*:-\send_\(object\|protocol\|category\)\.\(%.*\)\?$'
|
||||
let ind = ind - shiftwidth()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2018 May 31
|
||||
" Last Change: 2018 Aug 11
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -30,7 +30,7 @@ let s:kernels = ['linux', 'hurd', 'kfreebsd', 'knetbsd', 'kopensolaris', 'netbsd
|
||||
let s:archs = [
|
||||
\ 'alpha', 'amd64', 'armeb', 'armel', 'armhf', 'arm64', 'avr32', 'hppa'
|
||||
\, 'i386', 'ia64', 'lpia', 'm32r', 'm68k', 'mipsel', 'mips64el', 'mips'
|
||||
\, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 's390x', 's390', 'sh3eb'
|
||||
\, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 'riscv64', 's390x', 's390', 'sh3eb'
|
||||
\, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32'
|
||||
\ ]
|
||||
let s:pairs = [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2018 May 03
|
||||
" Last Change: 2018 Aug 11
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -25,7 +25,7 @@ let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'artful', 'bionic', 'cosmic', 'devel'
|
||||
\ 'trusty', 'xenial', 'bionic', 'cosmic', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
@@ -34,7 +34,7 @@ let s:unsupported = [
|
||||
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty'
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
||||
+29
-10
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Language: Logtalk
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Last Change: February 4, 2012
|
||||
" Last Change: August 3, 2018
|
||||
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -79,13 +79,13 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=log
|
||||
syn match logtalkDirTag ":- else\."
|
||||
syn match logtalkDirTag ":- endif\."
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn match logtalkDirTag ":- built_in\."
|
||||
syn match logtalkDirTag ":- dynamic\."
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
@@ -131,17 +131,20 @@ syn match logtalkBuiltIn "\<\(instantiat\|specializ\)es_class\ze("
|
||||
syn match logtalkBuiltIn "\<\(abolish\|define\)_events\ze("
|
||||
syn match logtalkBuiltIn "\<current_event\ze("
|
||||
|
||||
syn match logtalkBuiltIn "\<\(curren\|se\)t_logtalk_flag\ze("
|
||||
syn match logtalkBuiltIn "\<\(create\|current\|set\)_logtalk_flag\ze("
|
||||
|
||||
syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\)\ze("
|
||||
syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\|make\(_target_action\)\?\)\ze("
|
||||
syn match logtalkBuiltIn "\<logtalk_make\>"
|
||||
|
||||
syn match logtalkBuiltIn "\<\(for\|retract\)all\ze("
|
||||
|
||||
syn match logtalkBuiltIn "\<threaded\(_\(call\|once\|ignore\|exit\|peek\|wait\|notify\)\)\?\ze("
|
||||
syn match logtalkBuiltIn "\<threaded_engine\(_\(create\|destroy\|self\|next\|next_reified\|yield\|post\|fetch\)\)\?\ze("
|
||||
|
||||
|
||||
" Logtalk built-in methods
|
||||
|
||||
syn match logtalkBuiltInMethod "\<context\ze("
|
||||
syn match logtalkBuiltInMethod "\<parameter\ze("
|
||||
syn match logtalkBuiltInMethod "\<se\(lf\|nder\)\ze("
|
||||
syn match logtalkBuiltInMethod "\<this\ze("
|
||||
@@ -159,6 +162,8 @@ syn match logtalkBuiltInMethod "\<f\(ind\|or\)all\ze("
|
||||
syn match logtalkBuiltInMethod "\<before\ze("
|
||||
syn match logtalkBuiltInMethod "\<after\ze("
|
||||
|
||||
syn match logtalkBuiltInMethod "\<forward\ze("
|
||||
|
||||
syn match logtalkBuiltInMethod "\<expand_\(goal\|term\)\ze("
|
||||
syn match logtalkBuiltInMethod "\<\(goal\|term\)_expansion\ze("
|
||||
syn match logtalkBuiltInMethod "\<phrase\ze("
|
||||
@@ -174,6 +179,7 @@ syn match logtalkOperator "@"
|
||||
|
||||
syn match logtalkKeyword "\<true\>"
|
||||
syn match logtalkKeyword "\<fail\>"
|
||||
syn match logtalkKeyword "\<false\>"
|
||||
syn match logtalkKeyword "\<ca\(ll\|tch\)\ze("
|
||||
syn match logtalkOperator "!"
|
||||
" syn match logtalkOperator ","
|
||||
@@ -181,11 +187,14 @@ syn match logtalkOperator ";"
|
||||
syn match logtalkOperator "-->"
|
||||
syn match logtalkOperator "->"
|
||||
syn match logtalkKeyword "\<throw\ze("
|
||||
syn match logtalkKeyword "\<\(instantiation\|system\)_error\>"
|
||||
syn match logtalkKeyword "\<\(type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze("
|
||||
|
||||
|
||||
" Term unification
|
||||
|
||||
syn match logtalkOperator "="
|
||||
syn match logtalkKeyword "\<subsumes_term\ze("
|
||||
syn match logtalkKeyword "\<unify_with_occurs_check\ze("
|
||||
syn match logtalkOperator "\\="
|
||||
|
||||
@@ -199,6 +208,7 @@ syn match logtalkKeyword "\<float\ze("
|
||||
syn match logtalkKeyword "\<c\(allable\|ompound\)\ze("
|
||||
syn match logtalkKeyword "\<n\(onvar\|umber\)\ze("
|
||||
syn match logtalkKeyword "\<ground\ze("
|
||||
syn match logtalkKeyword "\<acyclic_term\ze("
|
||||
|
||||
|
||||
" Term comparison
|
||||
@@ -219,14 +229,20 @@ syn match logtalkKeyword "\<arg\ze("
|
||||
syn match logtalkOperator "=\.\."
|
||||
syn match logtalkKeyword "\<copy_term\ze("
|
||||
syn match logtalkKeyword "\<numbervars\ze("
|
||||
syn match logtalkKeyword "\<term_variables\ze("
|
||||
|
||||
|
||||
" Arithemtic evaluation
|
||||
" Predicate aliases
|
||||
|
||||
syn match logtalkOperator "\<as\>"
|
||||
|
||||
|
||||
" Arithmetic evaluation
|
||||
|
||||
syn match logtalkOperator "\<is\>"
|
||||
|
||||
|
||||
" Arithemtic comparison
|
||||
" Arithmetic comparison
|
||||
|
||||
syn match logtalkOperator "=:="
|
||||
syn match logtalkOperator "=\\="
|
||||
@@ -299,16 +315,18 @@ syn match logtalkOperator "-"
|
||||
syn match logtalkOperator "\*"
|
||||
syn match logtalkOperator "//"
|
||||
syn match logtalkOperator "/"
|
||||
syn match logtalkKeyword "\<div\ze("
|
||||
syn match logtalkKeyword "\<r\(ound\|em\)\ze("
|
||||
syn match logtalkKeyword "\<e\>"
|
||||
syn match logtalkKeyword "\<pi\>"
|
||||
syn match logtalkKeyword "\<div\>"
|
||||
syn match logtalkKeyword "\<rem\>"
|
||||
syn match logtalkKeyword "\<mod\ze("
|
||||
syn match logtalkKeyword "\<m\(ax\|in\|od\)\ze("
|
||||
syn match logtalkKeyword "\<mod\>"
|
||||
syn match logtalkKeyword "\<abs\ze("
|
||||
syn match logtalkKeyword "\<sign\ze("
|
||||
syn match logtalkKeyword "\<flo\(or\|at\(_\(integer\|fractional\)_part\)\?\)\ze("
|
||||
syn match logtalkKeyword "\<truncate\ze("
|
||||
syn match logtalkKeyword "\<t\(an\|runcate\)\ze("
|
||||
syn match logtalkKeyword "\<ceiling\ze("
|
||||
|
||||
|
||||
@@ -317,7 +335,7 @@ syn match logtalkKeyword "\<ceiling\ze("
|
||||
syn match logtalkOperator "\*\*"
|
||||
syn match logtalkKeyword "\<s\(in\|qrt\)\ze("
|
||||
syn match logtalkKeyword "\<cos\ze("
|
||||
syn match logtalkKeyword "\<atan\ze("
|
||||
syn match logtalkKeyword "\<a\(cos\|sin\|tan\|tan2\)\ze("
|
||||
syn match logtalkKeyword "\<exp\ze("
|
||||
syn match logtalkKeyword "\<log\ze("
|
||||
|
||||
@@ -329,6 +347,7 @@ syn match logtalkOperator "<<"
|
||||
syn match logtalkOperator "/\\"
|
||||
syn match logtalkOperator "\\/"
|
||||
syn match logtalkOperator "\\"
|
||||
syn match logtalkKeyword "\<xor\ze("
|
||||
|
||||
|
||||
" Logtalk list operator
|
||||
@@ -347,7 +366,7 @@ syn match logtalkNumber "\<\d\+\>"
|
||||
syn match logtalkNumber "\<\d\+\.\d\+\>"
|
||||
syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>"
|
||||
syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>"
|
||||
syn match logtalkNumber "\<0'.\|0''\|0'\"\>"
|
||||
syn match logtalkNumber "\<0'[\\]\?.\|0''\|0'\"\>"
|
||||
syn match logtalkNumber "\<0b[0-1]\+\>"
|
||||
syn match logtalkNumber "\<0o\o\+\>"
|
||||
syn match logtalkNumber "\<0x\x\+\>"
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>150</string>
|
||||
<string>151</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -105,7 +105,6 @@ extern NSTimeInterval MMBalloonEvalInternalDelay;
|
||||
- (BOOL)tabBarVisible;
|
||||
- (void)showTabBar:(BOOL)enable;
|
||||
- (void)setRows:(int)rows columns:(int)cols;
|
||||
- (void)resizeView;
|
||||
- (void)setWindowTitle:(char *)title;
|
||||
- (void)setDocumentFilename:(char *)filename;
|
||||
- (char *)browseForFileWithAttributes:(NSDictionary *)attr;
|
||||
|
||||
@@ -836,11 +836,6 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
[self queueMessage:SetTextDimensionsMsgID data:data];
|
||||
}
|
||||
|
||||
- (void)resizeView
|
||||
{
|
||||
[self queueMessage:ResizeViewMsgID data:nil];
|
||||
}
|
||||
|
||||
- (void)setWindowTitle:(char *)title
|
||||
{
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
@@ -2002,7 +1997,6 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
|
||||
tabpage_move(idx);
|
||||
} else if (SetTextDimensionsMsgID == msgid || LiveResizeMsgID == msgid
|
||||
|| SetTextDimensionsNoResizeWindowMsgID == msgid
|
||||
|| SetTextRowsMsgID == msgid || SetTextColumnsMsgID == msgid) {
|
||||
if (!data) return;
|
||||
const void *bytes = [data bytes];
|
||||
@@ -2034,8 +2028,6 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
[self queueMessage:msgid data:d];
|
||||
|
||||
gui_resize_shell(cols, rows);
|
||||
} else if (ResizeViewMsgID == msgid) {
|
||||
[self queueMessage:msgid data:data];
|
||||
} else if (ExecuteMenuMsgID == msgid) {
|
||||
NSDictionary *attrs = [NSDictionary dictionaryWithData:data];
|
||||
if (attrs) {
|
||||
|
||||
@@ -629,7 +629,6 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
[windowController showTabBar:NO];
|
||||
[self sendMessage:BackingPropertiesChangedMsgID data:nil];
|
||||
} else if (SetTextDimensionsMsgID == msgid || LiveResizeMsgID == msgid ||
|
||||
SetTextDimensionsNoResizeWindowMsgID == msgid ||
|
||||
SetTextDimensionsReplyMsgID == msgid) {
|
||||
const void *bytes = [data bytes];
|
||||
int rows = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -639,16 +638,11 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
// acknowledges it with a reply message. When this happens the window
|
||||
// should not move (the frontend would already have moved the window).
|
||||
BOOL onScreen = SetTextDimensionsReplyMsgID!=msgid;
|
||||
|
||||
BOOL keepGUISize = SetTextDimensionsNoResizeWindowMsgID == msgid;
|
||||
|
||||
[windowController setTextDimensionsWithRows:rows
|
||||
columns:cols
|
||||
isLive:(LiveResizeMsgID==msgid)
|
||||
keepGUISize:keepGUISize
|
||||
keepOnScreen:onScreen];
|
||||
} else if (ResizeViewMsgID == msgid) {
|
||||
[windowController resizeView];
|
||||
} else if (SetWindowTitleMsgID == msgid) {
|
||||
const void *bytes = [data bytes];
|
||||
int len = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
- (void)viewWillStartLiveResize;
|
||||
- (void)viewDidEndLiveResize;
|
||||
- (void)setFrameSize:(NSSize)size;
|
||||
- (void)setFrameSizeKeepGUISize:(NSSize)size;
|
||||
- (void)setFrame:(NSRect)frame;
|
||||
|
||||
@end
|
||||
|
||||
+5
-16
@@ -60,7 +60,7 @@ enum {
|
||||
- (NSSize)vimViewSizeForTextViewSize:(NSSize)textViewSize;
|
||||
- (NSRect)textViewRectForVimViewSize:(NSSize)contentSize;
|
||||
- (NSTabView *)tabView;
|
||||
- (void)frameSizeMayHaveChanged:(BOOL)keepGUISize;
|
||||
- (void)frameSizeMayHaveChanged;
|
||||
@end
|
||||
|
||||
|
||||
@@ -610,25 +610,14 @@ enum {
|
||||
// row will result in the vim view holding more rows than the can fit
|
||||
// inside the window.)
|
||||
[super setFrameSize:size];
|
||||
[self frameSizeMayHaveChanged:NO];
|
||||
}
|
||||
|
||||
- (void)setFrameSizeKeepGUISize:(NSSize)size
|
||||
{
|
||||
// NOTE: Instead of only acting when a frame was resized, we do some
|
||||
// updating each time a frame may be resized. (At the moment, if we only
|
||||
// respond to actual frame changes then typing ":set lines=1000" twice in a
|
||||
// row will result in the vim view holding more rows than the can fit
|
||||
// inside the window.)
|
||||
[super setFrameSize:size];
|
||||
[self frameSizeMayHaveChanged:YES];
|
||||
[self frameSizeMayHaveChanged];
|
||||
}
|
||||
|
||||
- (void)setFrame:(NSRect)frame
|
||||
{
|
||||
// See comment in setFrameSize: above.
|
||||
[super setFrame:frame];
|
||||
[self frameSizeMayHaveChanged:NO];
|
||||
[self frameSizeMayHaveChanged];
|
||||
}
|
||||
|
||||
@end // MMVimView
|
||||
@@ -878,7 +867,7 @@ enum {
|
||||
return tabView;
|
||||
}
|
||||
|
||||
- (void)frameSizeMayHaveChanged:(BOOL)keepGUISize
|
||||
- (void)frameSizeMayHaveChanged
|
||||
{
|
||||
// NOTE: Whenever a call is made that may have changed the frame size we
|
||||
// take the opportunity to make sure all subviews are in place and that the
|
||||
@@ -914,7 +903,7 @@ enum {
|
||||
if (constrained[0] != rows || constrained[1] != cols) {
|
||||
NSData *data = [NSData dataWithBytes:constrained length:2*sizeof(int)];
|
||||
int msgid = [self inLiveResize] ? LiveResizeMsgID
|
||||
: (keepGUISize ? SetTextDimensionsNoResizeWindowMsgID : SetTextDimensionsMsgID);
|
||||
: SetTextDimensionsMsgID;
|
||||
|
||||
ASLogDebug(@"Notify Vim that text dimensions changed from %dx%d to "
|
||||
"%dx%d (%s)", cols, rows, constrained[1], constrained[0],
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
BOOL setupDone;
|
||||
BOOL windowPresented;
|
||||
BOOL shouldResizeVimView;
|
||||
BOOL shouldKeepGUISize;
|
||||
BOOL shouldRestoreUserTopLeft;
|
||||
BOOL shouldMaximizeWindow;
|
||||
int updateToolbarFlag;
|
||||
@@ -60,9 +59,7 @@
|
||||
- (void)updateTabsWithData:(NSData *)data;
|
||||
- (void)selectTabWithIndex:(int)idx;
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols isLive:(BOOL)live
|
||||
keepGUISize:(BOOL)keepGUISize
|
||||
keepOnScreen:(BOOL)onScreen;
|
||||
- (void)resizeView;
|
||||
- (void)zoomWithRows:(int)rows columns:(int)cols state:(int)state;
|
||||
- (void)setTitle:(NSString *)title;
|
||||
- (void)setDocumentFilename:(NSString *)filename;
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
[win setDelegate:self];
|
||||
[win setInitialFirstResponder:[vimView textView]];
|
||||
|
||||
|
||||
if ([win styleMask] & NSWindowStyleMaskTexturedBackground) {
|
||||
// On Leopard, we want to have a textured window to have nice
|
||||
// looking tabs. But the textured window look implies rounded
|
||||
@@ -381,7 +381,6 @@
|
||||
}
|
||||
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols isLive:(BOOL)live
|
||||
keepGUISize:(BOOL)keepGUISize
|
||||
keepOnScreen:(BOOL)onScreen
|
||||
{
|
||||
ASLogDebug(@"setTextDimensionsWithRows:%d columns:%d isLive:%d "
|
||||
@@ -400,7 +399,7 @@
|
||||
|
||||
[vimView setDesiredRows:rows columns:cols];
|
||||
|
||||
if (setupDone && !live && !keepGUISize) {
|
||||
if (setupDone && !live) {
|
||||
shouldResizeVimView = YES;
|
||||
keepOnScreen = onScreen;
|
||||
}
|
||||
@@ -429,15 +428,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)resizeView
|
||||
{
|
||||
if (setupDone)
|
||||
{
|
||||
shouldResizeVimView = YES;
|
||||
shouldKeepGUISize = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)zoomWithRows:(int)rows columns:(int)cols state:(int)state
|
||||
{
|
||||
[self setTextDimensionsWithRows:rows
|
||||
@@ -513,6 +503,9 @@
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(int32_t)ident
|
||||
{
|
||||
BOOL scrollbarHidden = [vimView destroyScrollbarWithIdentifier:ident];
|
||||
shouldResizeVimView = shouldResizeVimView || scrollbarHidden;
|
||||
shouldMaximizeWindow = shouldMaximizeWindow || scrollbarHidden;
|
||||
|
||||
return scrollbarHidden;
|
||||
}
|
||||
|
||||
@@ -520,6 +513,9 @@
|
||||
{
|
||||
BOOL scrollbarToggled = [vimView showScrollbarWithIdentifier:ident
|
||||
state:visible];
|
||||
shouldResizeVimView = shouldResizeVimView || scrollbarToggled;
|
||||
shouldMaximizeWindow = shouldMaximizeWindow || scrollbarToggled;
|
||||
|
||||
return scrollbarToggled;
|
||||
}
|
||||
|
||||
@@ -604,18 +600,7 @@
|
||||
fullScreenWindow ? [fullScreenWindow frame].size :
|
||||
fullScreenEnabled ? desiredWindowSize :
|
||||
[self constrainContentSizeToScreenSize:[vimView desiredSize]]];
|
||||
|
||||
// Setting 'guioptions+=k' will make shouldKeepGUISize true, which
|
||||
// means avoid resizing the window. Instead, resize the view instead
|
||||
// to keep the GUI window's size consistent.
|
||||
bool avoidWindowResize = shouldKeepGUISize && !fullScreenEnabled;
|
||||
|
||||
if (!avoidWindowResize) {
|
||||
[vimView setFrameSize:contentSize];
|
||||
}
|
||||
else {
|
||||
[vimView setFrameSizeKeepGUISize:originalSize];
|
||||
}
|
||||
[vimView setFrameSize:contentSize];
|
||||
|
||||
if (fullScreenWindow) {
|
||||
// NOTE! Don't mark the full-screen content view as needing an
|
||||
@@ -628,15 +613,12 @@
|
||||
[fullScreenWindow centerView];
|
||||
}
|
||||
} else {
|
||||
if (!avoidWindowResize) {
|
||||
[self resizeWindowToFitContentSize:contentSize
|
||||
keepOnScreen:keepOnScreen];
|
||||
}
|
||||
[self resizeWindowToFitContentSize:contentSize
|
||||
keepOnScreen:keepOnScreen];
|
||||
}
|
||||
}
|
||||
|
||||
keepOnScreen = NO;
|
||||
shouldKeepGUISize = NO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,6 +657,7 @@
|
||||
{
|
||||
if (vimView && [vimView textView]) {
|
||||
[[vimView textView] setLinespace:(float)linespace];
|
||||
shouldMaximizeWindow = shouldResizeVimView = YES;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -682,6 +665,7 @@
|
||||
{
|
||||
if (vimView && [vimView textView]) {
|
||||
[[vimView textView] setColumnspace:(float)columnspace];
|
||||
shouldMaximizeWindow = shouldResizeVimView = YES;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1203,7 +1187,7 @@
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[self maximizeWindow:fullScreenOptions];
|
||||
|
||||
|
||||
// Fade in
|
||||
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
|
||||
[context setDuration:0.5*duration];
|
||||
@@ -1222,7 +1206,7 @@
|
||||
|
||||
// The separator should never be visible in fullscreen or split-screen.
|
||||
[decoratedWindow hideTablineSeparator:YES];
|
||||
|
||||
|
||||
// ASSUMPTION: fullScreenEnabled always reflects the state of Vim's 'fu'.
|
||||
if (!fullScreenEnabled) {
|
||||
ASLogDebug(@"Full-screen out of sync, tell Vim to set 'fu'");
|
||||
@@ -1324,7 +1308,7 @@
|
||||
// full-screen by moving the window out from Split View.
|
||||
[vimController sendMessage:BackingPropertiesChangedMsgID data:nil];
|
||||
}
|
||||
|
||||
|
||||
[self updateTablineSeparator];
|
||||
}
|
||||
|
||||
@@ -1552,6 +1536,7 @@
|
||||
// The tabline separator was toggled so the content view must change
|
||||
// size.
|
||||
[self updateResizeConstraints];
|
||||
shouldResizeVimView = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -176,10 +176,8 @@ enum {
|
||||
SetTextRowsMsgID,
|
||||
SetTextColumnsMsgID,
|
||||
SetTextDimensionsMsgID,
|
||||
SetTextDimensionsNoResizeWindowMsgID,
|
||||
LiveResizeMsgID,
|
||||
SetTextDimensionsReplyMsgID,
|
||||
ResizeViewMsgID,
|
||||
SetWindowTitleMsgID,
|
||||
ScrollWheelMsgID,
|
||||
MouseDownMsgID,
|
||||
|
||||
@@ -30,10 +30,8 @@ char *MessageStrings[] =
|
||||
"SetTextRowsMsgID",
|
||||
"SetTextColumnsMsgID",
|
||||
"SetTextDimensionsMsgID",
|
||||
"SetTextDimensionsNoResizeWindowMsgID",
|
||||
"LiveResizeMsgID",
|
||||
"SetTextDimensionsReplyMsgID",
|
||||
"ResizeViewMsgID",
|
||||
"SetWindowTitleMsgID",
|
||||
"ScrollWheelMsgID",
|
||||
"MouseDownMsgID",
|
||||
|
||||
@@ -1739,18 +1739,6 @@ gui_mch_set_shellsize(
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Re-calculates size of the Vim view to fit within the window without having
|
||||
* to resize the window. Usually happens after UI elements have changed (e.g.
|
||||
* adding / removing a toolbar) when guioptions 'k' is set.
|
||||
*/
|
||||
void
|
||||
gui_mch_resize_view()
|
||||
{
|
||||
[[MMBackend sharedInstance] resizeView];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the position of the top left corner of the window to the given
|
||||
* coordinates.
|
||||
|
||||
@@ -12,6 +12,7 @@ NEW_TESTS = \
|
||||
test_autocmd \
|
||||
test_autoload \
|
||||
test_backspace_opt \
|
||||
test_backup \
|
||||
test_blockedit \
|
||||
test_breakindent \
|
||||
test_bufline \
|
||||
|
||||
Vendored
+3
@@ -7690,6 +7690,9 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
|
||||
if test "$enable_rubyinterp" = "dynamic"; then
|
||||
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
|
||||
if test -z "$libruby_soname"; then
|
||||
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
|
||||
fi
|
||||
$as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
|
||||
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
|
||||
+4
-8
@@ -204,13 +204,8 @@ open_buffer(
|
||||
#endif
|
||||
#ifdef UNIX
|
||||
perm = mch_getperm(curbuf->b_ffname);
|
||||
if (perm >= 0 && (0
|
||||
# ifdef S_ISFIFO
|
||||
|| S_ISFIFO(perm)
|
||||
# endif
|
||||
# ifdef S_ISSOCK
|
||||
if (perm >= 0 && (S_ISFIFO(perm)
|
||||
|| S_ISSOCK(perm)
|
||||
# endif
|
||||
# ifdef OPEN_CHR_FILES
|
||||
|| (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname))
|
||||
# endif
|
||||
@@ -3808,7 +3803,8 @@ value_changed(char_u *str, char_u **last)
|
||||
if (str == NULL)
|
||||
{
|
||||
*last = NULL;
|
||||
mch_restore_title(last == &lasttitle ? 1 : 2);
|
||||
mch_restore_title(
|
||||
last == &lasttitle ? SAVE_RESTORE_TITLE : SAVE_RESTORE_ICON);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4239,7 +4235,7 @@ build_stl_str_hl(
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
|
||||
set_internal_string_var((char_u *)"actual_curbuf", tmp);
|
||||
set_internal_string_var((char_u *)"g:actual_curbuf", tmp);
|
||||
|
||||
save_curbuf = curbuf;
|
||||
save_curwin = curwin;
|
||||
|
||||
+12
-6
@@ -138,7 +138,7 @@ ch_log_active(void)
|
||||
}
|
||||
|
||||
static void
|
||||
ch_log_lead(const char *what, channel_T *ch)
|
||||
ch_log_lead(const char *what, channel_T *ch, ch_part_T part)
|
||||
{
|
||||
if (log_fd != NULL)
|
||||
{
|
||||
@@ -150,7 +150,13 @@ ch_log_lead(const char *what, channel_T *ch)
|
||||
fprintf(log_fd, "%s ", profile_msg(&log_now));
|
||||
#endif
|
||||
if (ch != NULL)
|
||||
fprintf(log_fd, "%son %d: ", what, ch->ch_id);
|
||||
{
|
||||
if (part < PART_COUNT)
|
||||
fprintf(log_fd, "%son %d(%s): ",
|
||||
what, ch->ch_id, part_names[part]);
|
||||
else
|
||||
fprintf(log_fd, "%son %d: ", what, ch->ch_id);
|
||||
}
|
||||
else
|
||||
fprintf(log_fd, "%s: ", what);
|
||||
}
|
||||
@@ -166,7 +172,7 @@ ch_log(channel_T *ch, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
ch_log_lead("", ch);
|
||||
ch_log_lead("", ch, PART_COUNT);
|
||||
va_start(ap, fmt);
|
||||
vfprintf(log_fd, fmt, ap);
|
||||
va_end(ap);
|
||||
@@ -191,7 +197,7 @@ ch_error(channel_T *ch, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
ch_log_lead("ERR ", ch);
|
||||
ch_log_lead("ERR ", ch, PART_COUNT);
|
||||
va_start(ap, fmt);
|
||||
vfprintf(log_fd, fmt, ap);
|
||||
va_end(ap);
|
||||
@@ -1875,7 +1881,7 @@ channel_save(channel_T *channel, ch_part_T part, char_u *buf, int len,
|
||||
|
||||
if (ch_log_active() && lead != NULL)
|
||||
{
|
||||
ch_log_lead(lead, channel);
|
||||
ch_log_lead(lead, channel, part);
|
||||
fprintf(log_fd, "'");
|
||||
ignored = (int)fwrite(buf, len, 1, log_fd);
|
||||
fprintf(log_fd, "'\n");
|
||||
@@ -3760,7 +3766,7 @@ channel_send(
|
||||
|
||||
if (ch_log_active())
|
||||
{
|
||||
ch_log_lead("SEND ", channel);
|
||||
ch_log_lead("SEND ", channel, part);
|
||||
fprintf(log_fd, "'");
|
||||
ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
|
||||
fprintf(log_fd, "'\n");
|
||||
|
||||
@@ -2020,6 +2020,9 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
AC_DEFINE(FEAT_RUBY)
|
||||
if test "$enable_rubyinterp" = "dynamic"; then
|
||||
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_ALIASES']].split[[0]]"`
|
||||
if test -z "$libruby_soname"; then
|
||||
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"`
|
||||
fi
|
||||
AC_DEFINE(DYNAMIC_RUBY)
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
RUBY_LIBS=
|
||||
|
||||
+42
-10
@@ -279,6 +279,7 @@ static colnr_T get_nolist_virtcol(void);
|
||||
#if defined(FEAT_EVAL)
|
||||
static char_u *do_insert_char_pre(int c);
|
||||
#endif
|
||||
static int ins_apply_autocmds(event_T event);
|
||||
|
||||
static colnr_T Insstart_textlen; /* length of line when insert started */
|
||||
static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */
|
||||
@@ -411,7 +412,7 @@ edit(
|
||||
set_vim_var_string(VV_INSERTMODE, ptr, 1);
|
||||
set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */
|
||||
#endif
|
||||
apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_INSERTENTER);
|
||||
|
||||
/* Make sure the cursor didn't move. Do call check_cursor_col() in
|
||||
* case the text was modified. Since Insert mode was not started yet
|
||||
@@ -1061,8 +1062,7 @@ doESCkey:
|
||||
if (ins_esc(&count, cmdchar, nomove))
|
||||
{
|
||||
if (cmdchar != 'r' && cmdchar != 'v')
|
||||
apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL,
|
||||
FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_INSERTLEAVE);
|
||||
did_cursorhold = FALSE;
|
||||
return (c == Ctrl_O);
|
||||
}
|
||||
@@ -1285,7 +1285,7 @@ doESCkey:
|
||||
break;
|
||||
|
||||
case K_CURSORHOLD: /* Didn't type something for a while. */
|
||||
apply_autocmds(EVENT_CURSORHOLDI, NULL, NULL, FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_CURSORHOLDI);
|
||||
did_cursorhold = TRUE;
|
||||
break;
|
||||
|
||||
@@ -1708,7 +1708,7 @@ ins_redraw(
|
||||
/* Make sure curswant is correct, an autocommand may call
|
||||
* getcurpos(). */
|
||||
update_curswant();
|
||||
apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_CURSORMOVEDI);
|
||||
}
|
||||
# ifdef FEAT_CONCEAL
|
||||
if (curwin->w_p_cole > 0)
|
||||
@@ -1731,12 +1731,16 @@ ins_redraw(
|
||||
)
|
||||
{
|
||||
aco_save_T aco;
|
||||
varnumber_T tick = CHANGEDTICK(curbuf);
|
||||
|
||||
// save and restore curwin and curbuf, in case the autocmd changes them
|
||||
aucmd_prepbuf(&aco, curbuf);
|
||||
apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
|
||||
aucmd_restbuf(&aco);
|
||||
curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
|
||||
if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds()
|
||||
u_save(curwin->w_cursor.lnum,
|
||||
(linenr_T)(curwin->w_cursor.lnum + 1));
|
||||
}
|
||||
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
@@ -1748,12 +1752,16 @@ ins_redraw(
|
||||
&& pum_visible())
|
||||
{
|
||||
aco_save_T aco;
|
||||
varnumber_T tick = CHANGEDTICK(curbuf);
|
||||
|
||||
// save and restore curwin and curbuf, in case the autocmd changes them
|
||||
aucmd_prepbuf(&aco, curbuf);
|
||||
apply_autocmds(EVENT_TEXTCHANGEDP, NULL, NULL, FALSE, curbuf);
|
||||
aucmd_restbuf(&aco);
|
||||
curbuf->b_last_changedtick_pum = CHANGEDTICK(curbuf);
|
||||
if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds()
|
||||
u_save(curwin->w_cursor.lnum,
|
||||
(linenr_T)(curwin->w_cursor.lnum + 1));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4127,13 +4135,13 @@ ins_compl_prep(int c)
|
||||
#endif
|
||||
/* Trigger the CompleteDone event to give scripts a chance to act
|
||||
* upon the completion. */
|
||||
apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_COMPLETEDONE);
|
||||
}
|
||||
}
|
||||
else if (ctrl_x_mode == CTRL_X_LOCAL_MSG)
|
||||
/* Trigger the CompleteDone event to give scripts a chance to act
|
||||
* upon the (possibly failed) completion. */
|
||||
apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_COMPLETEDONE);
|
||||
|
||||
/* reset continue_* if we left expansion-mode, if we stay they'll be
|
||||
* (re)set properly in ins_complete() */
|
||||
@@ -4434,10 +4442,15 @@ ins_compl_get_exp(pos_T *ini)
|
||||
? (char_u *)"." : curbuf->b_p_cpt;
|
||||
last_match_pos = first_match_pos = *ini;
|
||||
}
|
||||
else if (ins_buf != curbuf && !buf_valid(ins_buf))
|
||||
ins_buf = curbuf; // In case the buffer was wiped out.
|
||||
|
||||
compl_old_match = compl_curr_match; /* remember the last current match */
|
||||
pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;
|
||||
/* For ^N/^P loop over all the flags/windows/buffers in 'complete' */
|
||||
|
||||
/*
|
||||
* For ^N/^P loop over all the flags/windows/buffers in 'complete'.
|
||||
*/
|
||||
for (;;)
|
||||
{
|
||||
found_new_match = FAIL;
|
||||
@@ -8942,7 +8955,7 @@ ins_insert(int replaceState)
|
||||
: replaceState == VREPLACE ? "v"
|
||||
: "r"), 1);
|
||||
# endif
|
||||
apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
|
||||
ins_apply_autocmds(EVENT_INSERTCHANGE);
|
||||
if (State & REPLACE_FLAG)
|
||||
State = INSERT | (State & LANGMAP);
|
||||
else
|
||||
@@ -10755,7 +10768,7 @@ do_insert_char_pre(int c)
|
||||
set_vim_var_string(VV_CHAR, buf, -1); /* set v:char */
|
||||
|
||||
res = NULL;
|
||||
if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf))
|
||||
if (ins_apply_autocmds(EVENT_INSERTCHARPRE))
|
||||
{
|
||||
/* Get the value of v:char. It may be empty or more than one
|
||||
* character. Only use it when changed, otherwise continue with the
|
||||
@@ -10770,3 +10783,22 @@ do_insert_char_pre(int c)
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Trigger "event" and take care of fixing undo.
|
||||
*/
|
||||
static int
|
||||
ins_apply_autocmds(event_T event)
|
||||
{
|
||||
varnumber_T tick = CHANGEDTICK(curbuf);
|
||||
int r;
|
||||
|
||||
r = apply_autocmds(event, NULL, NULL, FALSE, curbuf);
|
||||
|
||||
// If u_savesub() was called then we are not prepared to start
|
||||
// a new line. Call u_save() with no contents to fix that.
|
||||
if (tick != CHANGEDTICK(curbuf))
|
||||
u_save(curwin->w_cursor.lnum, (linenr_T)(curwin->w_cursor.lnum + 1));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
+1
-42
@@ -5096,63 +5096,22 @@ f_getftype(typval_T *argvars, typval_T *rettv)
|
||||
rettv->v_type = VAR_STRING;
|
||||
if (mch_lstat((char *)fname, &st) >= 0)
|
||||
{
|
||||
#ifdef S_ISREG
|
||||
if (S_ISREG(st.st_mode))
|
||||
t = "file";
|
||||
else if (S_ISDIR(st.st_mode))
|
||||
t = "dir";
|
||||
# ifdef S_ISLNK
|
||||
else if (S_ISLNK(st.st_mode))
|
||||
t = "link";
|
||||
# endif
|
||||
# ifdef S_ISBLK
|
||||
else if (S_ISBLK(st.st_mode))
|
||||
t = "bdev";
|
||||
# endif
|
||||
# ifdef S_ISCHR
|
||||
else if (S_ISCHR(st.st_mode))
|
||||
t = "cdev";
|
||||
# endif
|
||||
# ifdef S_ISFIFO
|
||||
else if (S_ISFIFO(st.st_mode))
|
||||
t = "fifo";
|
||||
# endif
|
||||
# ifdef S_ISSOCK
|
||||
else if (S_ISSOCK(st.st_mode))
|
||||
t = "fifo";
|
||||
# endif
|
||||
t = "socket";
|
||||
else
|
||||
t = "other";
|
||||
#else
|
||||
# ifdef S_IFMT
|
||||
switch (st.st_mode & S_IFMT)
|
||||
{
|
||||
case S_IFREG: t = "file"; break;
|
||||
case S_IFDIR: t = "dir"; break;
|
||||
# ifdef S_IFLNK
|
||||
case S_IFLNK: t = "link"; break;
|
||||
# endif
|
||||
# ifdef S_IFBLK
|
||||
case S_IFBLK: t = "bdev"; break;
|
||||
# endif
|
||||
# ifdef S_IFCHR
|
||||
case S_IFCHR: t = "cdev"; break;
|
||||
# endif
|
||||
# ifdef S_IFIFO
|
||||
case S_IFIFO: t = "fifo"; break;
|
||||
# endif
|
||||
# ifdef S_IFSOCK
|
||||
case S_IFSOCK: t = "socket"; break;
|
||||
# endif
|
||||
default: t = "other";
|
||||
}
|
||||
# else
|
||||
if (mch_isdir(fname))
|
||||
t = "dir";
|
||||
else
|
||||
t = "file";
|
||||
# endif
|
||||
#endif
|
||||
type = vim_strsave((char_u *)t);
|
||||
}
|
||||
rettv->vval.v_string = type;
|
||||
|
||||
+1
-1
@@ -281,7 +281,7 @@ linelen(int *has_tab)
|
||||
*last = NUL;
|
||||
len = linetabsize(line); /* get line length */
|
||||
if (has_tab != NULL) /* check for embedded TAB */
|
||||
*has_tab = (vim_strrchr(first, TAB) != NULL);
|
||||
*has_tab = (vim_strchr(first, TAB) != NULL);
|
||||
*last = save;
|
||||
|
||||
return len;
|
||||
|
||||
+177
-164
@@ -1726,7 +1726,6 @@ do_one_cmd(
|
||||
cmdmod_T save_cmdmod;
|
||||
int ni; /* set when Not Implemented */
|
||||
char_u *cmd;
|
||||
int address_count = 1;
|
||||
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
ea.line1 = 1;
|
||||
@@ -2052,168 +2051,9 @@ do_one_cmd(
|
||||
get_wincmd_addr_type(skipwhite(p), &ea);
|
||||
}
|
||||
|
||||
/* repeat for all ',' or ';' separated addresses */
|
||||
ea.cmd = cmd;
|
||||
for (;;)
|
||||
{
|
||||
ea.line1 = ea.line2;
|
||||
switch (ea.addr_type)
|
||||
{
|
||||
case ADDR_LINES:
|
||||
/* default is current line number */
|
||||
ea.line2 = curwin->w_cursor.lnum;
|
||||
break;
|
||||
case ADDR_WINDOWS:
|
||||
ea.line2 = CURRENT_WIN_NR;
|
||||
break;
|
||||
case ADDR_ARGUMENTS:
|
||||
ea.line2 = curwin->w_arg_idx + 1;
|
||||
if (ea.line2 > ARGCOUNT)
|
||||
ea.line2 = ARGCOUNT;
|
||||
break;
|
||||
case ADDR_LOADED_BUFFERS:
|
||||
case ADDR_BUFFERS:
|
||||
ea.line2 = curbuf->b_fnum;
|
||||
break;
|
||||
case ADDR_TABS:
|
||||
ea.line2 = CURRENT_TAB_NR;
|
||||
break;
|
||||
case ADDR_TABS_RELATIVE:
|
||||
ea.line2 = 1;
|
||||
break;
|
||||
#ifdef FEAT_QUICKFIX
|
||||
case ADDR_QUICKFIX:
|
||||
ea.line2 = qf_get_cur_valid_idx(&ea);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
ea.cmd = skipwhite(ea.cmd);
|
||||
lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip,
|
||||
ea.addr_count == 0, address_count++);
|
||||
if (ea.cmd == NULL) /* error detected */
|
||||
goto doend;
|
||||
if (lnum == MAXLNUM)
|
||||
{
|
||||
if (*ea.cmd == '%') /* '%' - all lines */
|
||||
{
|
||||
++ea.cmd;
|
||||
switch (ea.addr_type)
|
||||
{
|
||||
case ADDR_LINES:
|
||||
ea.line1 = 1;
|
||||
ea.line2 = curbuf->b_ml.ml_line_count;
|
||||
break;
|
||||
case ADDR_LOADED_BUFFERS:
|
||||
{
|
||||
buf_T *buf = firstbuf;
|
||||
|
||||
while (buf->b_next != NULL
|
||||
&& buf->b_ml.ml_mfp == NULL)
|
||||
buf = buf->b_next;
|
||||
ea.line1 = buf->b_fnum;
|
||||
buf = lastbuf;
|
||||
while (buf->b_prev != NULL
|
||||
&& buf->b_ml.ml_mfp == NULL)
|
||||
buf = buf->b_prev;
|
||||
ea.line2 = buf->b_fnum;
|
||||
break;
|
||||
}
|
||||
case ADDR_BUFFERS:
|
||||
ea.line1 = firstbuf->b_fnum;
|
||||
ea.line2 = lastbuf->b_fnum;
|
||||
break;
|
||||
case ADDR_WINDOWS:
|
||||
case ADDR_TABS:
|
||||
if (IS_USER_CMDIDX(ea.cmdidx))
|
||||
{
|
||||
ea.line1 = 1;
|
||||
ea.line2 = ea.addr_type == ADDR_WINDOWS
|
||||
? LAST_WIN_NR : LAST_TAB_NR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* there is no Vim command which uses '%' and
|
||||
* ADDR_WINDOWS or ADDR_TABS */
|
||||
errormsg = (char_u *)_(e_invrange);
|
||||
goto doend;
|
||||
}
|
||||
break;
|
||||
case ADDR_TABS_RELATIVE:
|
||||
errormsg = (char_u *)_(e_invrange);
|
||||
goto doend;
|
||||
break;
|
||||
case ADDR_ARGUMENTS:
|
||||
if (ARGCOUNT == 0)
|
||||
ea.line1 = ea.line2 = 0;
|
||||
else
|
||||
{
|
||||
ea.line1 = 1;
|
||||
ea.line2 = ARGCOUNT;
|
||||
}
|
||||
break;
|
||||
#ifdef FEAT_QUICKFIX
|
||||
case ADDR_QUICKFIX:
|
||||
ea.line1 = 1;
|
||||
ea.line2 = qf_get_size(&ea);
|
||||
if (ea.line2 == 0)
|
||||
ea.line2 = 1;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
++ea.addr_count;
|
||||
}
|
||||
/* '*' - visual area */
|
||||
else if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL)
|
||||
{
|
||||
pos_T *fp;
|
||||
|
||||
if (ea.addr_type != ADDR_LINES)
|
||||
{
|
||||
errormsg = (char_u *)_(e_invrange);
|
||||
goto doend;
|
||||
}
|
||||
|
||||
++ea.cmd;
|
||||
if (!ea.skip)
|
||||
{
|
||||
fp = getmark('<', FALSE);
|
||||
if (check_mark(fp) == FAIL)
|
||||
goto doend;
|
||||
ea.line1 = fp->lnum;
|
||||
fp = getmark('>', FALSE);
|
||||
if (check_mark(fp) == FAIL)
|
||||
goto doend;
|
||||
ea.line2 = fp->lnum;
|
||||
++ea.addr_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ea.line2 = lnum;
|
||||
ea.addr_count++;
|
||||
|
||||
if (*ea.cmd == ';')
|
||||
{
|
||||
if (!ea.skip)
|
||||
{
|
||||
curwin->w_cursor.lnum = ea.line2;
|
||||
/* don't leave the cursor on an illegal line or column */
|
||||
check_cursor();
|
||||
}
|
||||
}
|
||||
else if (*ea.cmd != ',')
|
||||
break;
|
||||
++ea.cmd;
|
||||
}
|
||||
|
||||
/* One address given: set start and end lines */
|
||||
if (ea.addr_count == 1)
|
||||
{
|
||||
ea.line1 = ea.line2;
|
||||
/* ... but only implicit: really no address given */
|
||||
if (lnum == MAXLNUM)
|
||||
ea.addr_count = 0;
|
||||
}
|
||||
if (parse_cmd_address(&ea, &errormsg) == FAIL)
|
||||
goto doend;
|
||||
|
||||
/*
|
||||
* 5. Parse the command.
|
||||
@@ -2995,6 +2835,179 @@ doend:
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Parse the address range, if any, in "eap".
|
||||
* Return FAIL and set "errormsg" or return OK.
|
||||
*/
|
||||
int
|
||||
parse_cmd_address(exarg_T *eap, char_u **errormsg)
|
||||
{
|
||||
int address_count = 1;
|
||||
linenr_T lnum;
|
||||
|
||||
// Repeat for all ',' or ';' separated addresses.
|
||||
for (;;)
|
||||
{
|
||||
eap->line1 = eap->line2;
|
||||
switch (eap->addr_type)
|
||||
{
|
||||
case ADDR_LINES:
|
||||
// default is current line number
|
||||
eap->line2 = curwin->w_cursor.lnum;
|
||||
break;
|
||||
case ADDR_WINDOWS:
|
||||
eap->line2 = CURRENT_WIN_NR;
|
||||
break;
|
||||
case ADDR_ARGUMENTS:
|
||||
eap->line2 = curwin->w_arg_idx + 1;
|
||||
if (eap->line2 > ARGCOUNT)
|
||||
eap->line2 = ARGCOUNT;
|
||||
break;
|
||||
case ADDR_LOADED_BUFFERS:
|
||||
case ADDR_BUFFERS:
|
||||
eap->line2 = curbuf->b_fnum;
|
||||
break;
|
||||
case ADDR_TABS:
|
||||
eap->line2 = CURRENT_TAB_NR;
|
||||
break;
|
||||
case ADDR_TABS_RELATIVE:
|
||||
eap->line2 = 1;
|
||||
break;
|
||||
#ifdef FEAT_QUICKFIX
|
||||
case ADDR_QUICKFIX:
|
||||
eap->line2 = qf_get_cur_valid_idx(eap);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
eap->cmd = skipwhite(eap->cmd);
|
||||
lnum = get_address(eap, &eap->cmd, eap->addr_type, eap->skip,
|
||||
eap->addr_count == 0, address_count++);
|
||||
if (eap->cmd == NULL) // error detected
|
||||
return FAIL;
|
||||
if (lnum == MAXLNUM)
|
||||
{
|
||||
if (*eap->cmd == '%') // '%' - all lines
|
||||
{
|
||||
++eap->cmd;
|
||||
switch (eap->addr_type)
|
||||
{
|
||||
case ADDR_LINES:
|
||||
eap->line1 = 1;
|
||||
eap->line2 = curbuf->b_ml.ml_line_count;
|
||||
break;
|
||||
case ADDR_LOADED_BUFFERS:
|
||||
{
|
||||
buf_T *buf = firstbuf;
|
||||
|
||||
while (buf->b_next != NULL
|
||||
&& buf->b_ml.ml_mfp == NULL)
|
||||
buf = buf->b_next;
|
||||
eap->line1 = buf->b_fnum;
|
||||
buf = lastbuf;
|
||||
while (buf->b_prev != NULL
|
||||
&& buf->b_ml.ml_mfp == NULL)
|
||||
buf = buf->b_prev;
|
||||
eap->line2 = buf->b_fnum;
|
||||
break;
|
||||
}
|
||||
case ADDR_BUFFERS:
|
||||
eap->line1 = firstbuf->b_fnum;
|
||||
eap->line2 = lastbuf->b_fnum;
|
||||
break;
|
||||
case ADDR_WINDOWS:
|
||||
case ADDR_TABS:
|
||||
if (IS_USER_CMDIDX(eap->cmdidx))
|
||||
{
|
||||
eap->line1 = 1;
|
||||
eap->line2 = eap->addr_type == ADDR_WINDOWS
|
||||
? LAST_WIN_NR : LAST_TAB_NR;
|
||||
}
|
||||
else
|
||||
{
|
||||
// there is no Vim command which uses '%' and
|
||||
// ADDR_WINDOWS or ADDR_TABS
|
||||
*errormsg = (char_u *)_(e_invrange);
|
||||
return FAIL;
|
||||
}
|
||||
break;
|
||||
case ADDR_TABS_RELATIVE:
|
||||
*errormsg = (char_u *)_(e_invrange);
|
||||
return FAIL;
|
||||
case ADDR_ARGUMENTS:
|
||||
if (ARGCOUNT == 0)
|
||||
eap->line1 = eap->line2 = 0;
|
||||
else
|
||||
{
|
||||
eap->line1 = 1;
|
||||
eap->line2 = ARGCOUNT;
|
||||
}
|
||||
break;
|
||||
#ifdef FEAT_QUICKFIX
|
||||
case ADDR_QUICKFIX:
|
||||
eap->line1 = 1;
|
||||
eap->line2 = qf_get_size(eap);
|
||||
if (eap->line2 == 0)
|
||||
eap->line2 = 1;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
++eap->addr_count;
|
||||
}
|
||||
else if (*eap->cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL)
|
||||
{
|
||||
pos_T *fp;
|
||||
|
||||
// '*' - visual area
|
||||
if (eap->addr_type != ADDR_LINES)
|
||||
{
|
||||
*errormsg = (char_u *)_(e_invrange);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
++eap->cmd;
|
||||
if (!eap->skip)
|
||||
{
|
||||
fp = getmark('<', FALSE);
|
||||
if (check_mark(fp) == FAIL)
|
||||
return FAIL;
|
||||
eap->line1 = fp->lnum;
|
||||
fp = getmark('>', FALSE);
|
||||
if (check_mark(fp) == FAIL)
|
||||
return FAIL;
|
||||
eap->line2 = fp->lnum;
|
||||
++eap->addr_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
eap->line2 = lnum;
|
||||
eap->addr_count++;
|
||||
|
||||
if (*eap->cmd == ';')
|
||||
{
|
||||
if (!eap->skip)
|
||||
{
|
||||
curwin->w_cursor.lnum = eap->line2;
|
||||
// don't leave the cursor on an illegal line or column
|
||||
check_cursor();
|
||||
}
|
||||
}
|
||||
else if (*eap->cmd != ',')
|
||||
break;
|
||||
++eap->cmd;
|
||||
}
|
||||
|
||||
// One address given: set start and end lines.
|
||||
if (eap->addr_count == 1)
|
||||
{
|
||||
eap->line1 = eap->line2;
|
||||
// ... but only implicit: really no address given
|
||||
if (lnum == MAXLNUM)
|
||||
eap->addr_count = 0;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for an Ex command with optional tail.
|
||||
* If there is a match advance "pp" to the argument and return TRUE.
|
||||
@@ -4308,7 +4321,7 @@ set_one_cmd_context(
|
||||
}
|
||||
|
||||
/*
|
||||
* skip a range specifier of the form: addr [,addr] [;addr] ..
|
||||
* Skip a range specifier of the form: addr [,addr] [;addr] ..
|
||||
*
|
||||
* Backslashed delimiters after / or ? will be skipped, and commands will
|
||||
* not be expanded between /'s and ?'s or after "'".
|
||||
@@ -7766,7 +7779,7 @@ ex_stop(exarg_T *eap)
|
||||
stoptermcap();
|
||||
out_flush(); /* needed for SUN to restore xterm buffer */
|
||||
#ifdef FEAT_TITLE
|
||||
mch_restore_title(3); /* restore window titles */
|
||||
mch_restore_title(SAVE_RESTORE_BOTH); /* restore window titles */
|
||||
#endif
|
||||
ui_suspend(); /* call machine specific function */
|
||||
#ifdef FEAT_TITLE
|
||||
|
||||
+482
-282
@@ -140,9 +140,6 @@ static int
|
||||
_RTLENTRYF
|
||||
#endif
|
||||
sort_func_compare(const void *s1, const void *s2);
|
||||
#endif
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
static void set_search_match(pos_T *t);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -185,9 +182,8 @@ empty_pattern(char_u *p)
|
||||
n -= 2;
|
||||
return n == 0 || (n >= 2 && p[n - 2] == '\\' && p[n - 1] == '|');
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
// Struct to store the viewstate during 'incsearch' highlighting.
|
||||
typedef struct {
|
||||
colnr_T vs_curswant;
|
||||
colnr_T vs_leftcol;
|
||||
@@ -224,6 +220,473 @@ restore_viewstate(viewstate_T *vs)
|
||||
curwin->w_botline = vs->vs_botline;
|
||||
curwin->w_empty_rows = vs->vs_empty_rows;
|
||||
}
|
||||
|
||||
// Struct to store the state of 'incsearch' highlighting.
|
||||
typedef struct {
|
||||
pos_T search_start; // where 'incsearch' starts searching
|
||||
pos_T save_cursor;
|
||||
viewstate_T init_viewstate;
|
||||
viewstate_T old_viewstate;
|
||||
pos_T match_start;
|
||||
pos_T match_end;
|
||||
int did_incsearch;
|
||||
int incsearch_postponed;
|
||||
} incsearch_state_T;
|
||||
|
||||
static void
|
||||
init_incsearch_state(incsearch_state_T *is_state)
|
||||
{
|
||||
is_state->match_start = curwin->w_cursor;
|
||||
is_state->did_incsearch = FALSE;
|
||||
is_state->incsearch_postponed = FALSE;
|
||||
CLEAR_POS(&is_state->match_end);
|
||||
is_state->save_cursor = curwin->w_cursor; // may be restored later
|
||||
is_state->search_start = curwin->w_cursor;
|
||||
save_viewstate(&is_state->init_viewstate);
|
||||
save_viewstate(&is_state->old_viewstate);
|
||||
}
|
||||
|
||||
/*
|
||||
* First move cursor to end of match, then to the start. This
|
||||
* moves the whole match onto the screen when 'nowrap' is set.
|
||||
*/
|
||||
static void
|
||||
set_search_match(pos_T *t)
|
||||
{
|
||||
t->lnum += search_match_lines;
|
||||
t->col = search_match_endcol;
|
||||
if (t->lnum > curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
t->lnum = curbuf->b_ml.ml_line_count;
|
||||
coladvance((colnr_T)MAXCOL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when 'incsearch' highlighting is to be done.
|
||||
* Sets search_first_line and search_last_line to the address range.
|
||||
*/
|
||||
static int
|
||||
do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
|
||||
int *skiplen, int *patlen)
|
||||
{
|
||||
*skiplen = 0;
|
||||
*patlen = ccline.cmdlen;
|
||||
|
||||
if (p_is && !cmd_silent)
|
||||
{
|
||||
// by default search all lines
|
||||
search_first_line = 0;
|
||||
search_last_line = MAXLNUM;
|
||||
|
||||
if (firstc == '/' || firstc == '?')
|
||||
return TRUE;
|
||||
if (firstc == ':')
|
||||
{
|
||||
char_u *cmd = skip_range(ccline.cmdbuff, NULL);
|
||||
char_u *p;
|
||||
int delim;
|
||||
char_u *end;
|
||||
|
||||
if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
|
||||
{
|
||||
// Skip over "substitute" to find the pattern separator.
|
||||
for (p = cmd; ASCII_ISALPHA(*p); ++p)
|
||||
;
|
||||
if (*skipwhite(p) != NUL
|
||||
&& (STRNCMP(cmd, "substitute", p - cmd) == 0
|
||||
|| STRNCMP(cmd, "global", p - cmd) == 0
|
||||
|| STRNCMP(cmd, "vglobal", p - cmd) == 0))
|
||||
{
|
||||
// Check for "global!/".
|
||||
if (*cmd == 'g' && *p == '!')
|
||||
{
|
||||
p++;
|
||||
if (*skipwhite(p) == NUL)
|
||||
return FALSE;
|
||||
}
|
||||
p = skipwhite(p);
|
||||
delim = *p++;
|
||||
end = skip_regexp(p, delim, p_magic, NULL);
|
||||
if (end > p || *end == delim)
|
||||
{
|
||||
char_u *dummy;
|
||||
exarg_T ea;
|
||||
pos_T save_cursor = curwin->w_cursor;
|
||||
|
||||
// found a non-empty pattern
|
||||
*skiplen = (int)(p - ccline.cmdbuff);
|
||||
*patlen = (int)(end - p);
|
||||
|
||||
// parse the address range
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
ea.line1 = 1;
|
||||
ea.line2 = 1;
|
||||
ea.cmd = ccline.cmdbuff;
|
||||
ea.addr_type = ADDR_LINES;
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
parse_cmd_address(&ea, &dummy);
|
||||
if (ea.addr_count > 0)
|
||||
{
|
||||
// Allow for reverse match.
|
||||
if (ea.line2 < ea.line1)
|
||||
{
|
||||
search_first_line = ea.line2;
|
||||
search_last_line = ea.line1;
|
||||
}
|
||||
else
|
||||
{
|
||||
search_first_line = ea.line1;
|
||||
search_last_line = ea.line2;
|
||||
}
|
||||
}
|
||||
else if (*cmd == 's')
|
||||
{
|
||||
// :s defaults to the current line
|
||||
search_first_line = curwin->w_cursor.lnum;
|
||||
search_last_line = curwin->w_cursor.lnum;
|
||||
}
|
||||
|
||||
curwin->w_cursor = save_cursor;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
finish_incsearch_highlighting(
|
||||
int gotesc,
|
||||
incsearch_state_T *is_state,
|
||||
int call_update_screen)
|
||||
{
|
||||
if (is_state->did_incsearch)
|
||||
{
|
||||
is_state->did_incsearch = FALSE;
|
||||
if (gotesc)
|
||||
curwin->w_cursor = is_state->save_cursor;
|
||||
else
|
||||
{
|
||||
if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
|
||||
{
|
||||
// put the '" mark at the original position
|
||||
curwin->w_cursor = is_state->save_cursor;
|
||||
setpcmark();
|
||||
}
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
}
|
||||
restore_viewstate(&is_state->old_viewstate);
|
||||
highlight_match = FALSE;
|
||||
validate_cursor(); /* needed for TAB */
|
||||
if (call_update_screen)
|
||||
update_screen(SOME_VALID);
|
||||
else
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Do 'incsearch' highlighting if desired.
|
||||
*/
|
||||
static void
|
||||
may_do_incsearch_highlighting(
|
||||
int firstc,
|
||||
long count,
|
||||
incsearch_state_T *is_state)
|
||||
{
|
||||
int skiplen, patlen;
|
||||
int i;
|
||||
pos_T end_pos;
|
||||
struct cmdline_info save_ccline;
|
||||
#ifdef FEAT_RELTIME
|
||||
proftime_T tm;
|
||||
#endif
|
||||
int next_char;
|
||||
int use_last_pat;
|
||||
|
||||
if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
|
||||
{
|
||||
finish_incsearch_highlighting(FALSE, is_state, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
// If there is a character waiting, search and redraw later.
|
||||
if (char_avail())
|
||||
{
|
||||
is_state->incsearch_postponed = TRUE;
|
||||
return;
|
||||
}
|
||||
is_state->incsearch_postponed = FALSE;
|
||||
|
||||
if (search_first_line == 0)
|
||||
// start at the original cursor position
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
else
|
||||
{
|
||||
// start at the first line in the range
|
||||
curwin->w_cursor.lnum = search_first_line;
|
||||
curwin->w_cursor.col = 0;
|
||||
}
|
||||
save_last_search_pattern();
|
||||
|
||||
// Use the previous pattern for ":s//".
|
||||
next_char = ccline.cmdbuff[skiplen + patlen];
|
||||
use_last_pat = patlen == 0 && skiplen > 0
|
||||
&& ccline.cmdbuff[skiplen - 1] == next_char;
|
||||
|
||||
// If there is no pattern, don't do anything.
|
||||
if (patlen == 0 && !use_last_pat)
|
||||
{
|
||||
i = 0;
|
||||
set_no_hlsearch(TRUE); // turn off previous highlight
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
else
|
||||
{
|
||||
int search_flags = SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK;
|
||||
|
||||
cursor_off(); // so the user knows we're busy
|
||||
out_flush();
|
||||
++emsg_off; // so it doesn't beep if bad expr
|
||||
#ifdef FEAT_RELTIME
|
||||
// Set the time limit to half a second.
|
||||
profile_setlimit(500L, &tm);
|
||||
#endif
|
||||
if (!p_hls)
|
||||
search_flags += SEARCH_KEEP;
|
||||
if (search_first_line != 0)
|
||||
search_flags += SEARCH_START;
|
||||
ccline.cmdbuff[skiplen + patlen] = NUL;
|
||||
i = do_search(NULL, firstc == ':' ? '/' : firstc,
|
||||
ccline.cmdbuff + skiplen, count, search_flags,
|
||||
#ifdef FEAT_RELTIME
|
||||
&tm, NULL
|
||||
#else
|
||||
NULL, NULL
|
||||
#endif
|
||||
);
|
||||
ccline.cmdbuff[skiplen + patlen] = next_char;
|
||||
--emsg_off;
|
||||
|
||||
if (curwin->w_cursor.lnum < search_first_line
|
||||
|| curwin->w_cursor.lnum > search_last_line)
|
||||
// match outside of address range
|
||||
i = 0;
|
||||
|
||||
// if interrupted while searching, behave like it failed
|
||||
if (got_int)
|
||||
{
|
||||
(void)vpeekc(); // remove <C-C> from input stream
|
||||
got_int = FALSE; // don't abandon the command line
|
||||
i = 0;
|
||||
}
|
||||
else if (char_avail())
|
||||
// cancelled searching because a char was typed
|
||||
is_state->incsearch_postponed = TRUE;
|
||||
}
|
||||
if (i != 0)
|
||||
highlight_match = TRUE; // highlight position
|
||||
else
|
||||
highlight_match = FALSE; // remove highlight
|
||||
|
||||
// First restore the old curwin values, so the screen is positioned in the
|
||||
// same way as the actual search command.
|
||||
restore_viewstate(&is_state->old_viewstate);
|
||||
changed_cline_bef_curs();
|
||||
update_topline();
|
||||
|
||||
if (i != 0)
|
||||
{
|
||||
pos_T save_pos = curwin->w_cursor;
|
||||
|
||||
is_state->match_start = curwin->w_cursor;
|
||||
set_search_match(&curwin->w_cursor);
|
||||
validate_cursor();
|
||||
end_pos = curwin->w_cursor;
|
||||
is_state->match_end = end_pos;
|
||||
curwin->w_cursor = save_pos;
|
||||
}
|
||||
else
|
||||
end_pos = curwin->w_cursor; // shutup gcc 4
|
||||
|
||||
// Disable 'hlsearch' highlighting if the pattern matches everything.
|
||||
// Avoids a flash when typing "foo\|".
|
||||
if (!use_last_pat)
|
||||
{
|
||||
next_char = ccline.cmdbuff[skiplen + patlen];
|
||||
ccline.cmdbuff[skiplen + patlen] = NUL;
|
||||
if (empty_pattern(ccline.cmdbuff))
|
||||
set_no_hlsearch(TRUE);
|
||||
ccline.cmdbuff[skiplen + patlen] = next_char;
|
||||
}
|
||||
|
||||
validate_cursor();
|
||||
// May redraw the status line to show the cursor position.
|
||||
if (p_ru && curwin->w_status_height > 0)
|
||||
curwin->w_redr_status = TRUE;
|
||||
|
||||
save_cmdline(&save_ccline);
|
||||
update_screen(SOME_VALID);
|
||||
restore_cmdline(&save_ccline);
|
||||
restore_last_search_pattern();
|
||||
|
||||
// Leave it at the end to make CTRL-R CTRL-W work.
|
||||
if (i != 0)
|
||||
curwin->w_cursor = end_pos;
|
||||
|
||||
msg_starthere();
|
||||
redrawcmdline();
|
||||
is_state->did_incsearch = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* May adjust 'incsearch' highlighting for typing CTRL-G and CTRL-T, go to next
|
||||
* or previous match.
|
||||
* Returns FAIL when jumping to cmdline_not_changed;
|
||||
*/
|
||||
static int
|
||||
may_adjust_incsearch_highlighting(
|
||||
int firstc,
|
||||
long count,
|
||||
incsearch_state_T *is_state,
|
||||
int c)
|
||||
{
|
||||
int skiplen, patlen;
|
||||
pos_T t;
|
||||
char_u *pat;
|
||||
int search_flags = SEARCH_NOOF;
|
||||
int i;
|
||||
int save;
|
||||
|
||||
if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
|
||||
return OK;
|
||||
if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL)
|
||||
return FAIL;
|
||||
|
||||
if (firstc == ccline.cmdbuff[skiplen])
|
||||
{
|
||||
pat = last_search_pattern();
|
||||
skiplen = 0;
|
||||
patlen = STRLEN(pat);
|
||||
}
|
||||
else
|
||||
pat = ccline.cmdbuff + skiplen;
|
||||
|
||||
save_last_search_pattern();
|
||||
cursor_off();
|
||||
out_flush();
|
||||
if (c == Ctrl_G)
|
||||
{
|
||||
t = is_state->match_end;
|
||||
if (LT_POS(is_state->match_start, is_state->match_end))
|
||||
// Start searching at the end of the match not at the beginning of
|
||||
// the next column.
|
||||
(void)decl(&t);
|
||||
search_flags += SEARCH_COL;
|
||||
}
|
||||
else
|
||||
t = is_state->match_start;
|
||||
if (!p_hls)
|
||||
search_flags += SEARCH_KEEP;
|
||||
++emsg_off;
|
||||
save = pat[patlen];
|
||||
pat[patlen] = NUL;
|
||||
i = searchit(curwin, curbuf, &t,
|
||||
c == Ctrl_G ? FORWARD : BACKWARD,
|
||||
pat, count, search_flags,
|
||||
RE_SEARCH, 0, NULL, NULL);
|
||||
--emsg_off;
|
||||
pat[patlen] = save;
|
||||
if (i)
|
||||
{
|
||||
is_state->search_start = is_state->match_start;
|
||||
is_state->match_end = t;
|
||||
is_state->match_start = t;
|
||||
if (c == Ctrl_T && firstc != '?')
|
||||
{
|
||||
// Move just before the current match, so that when nv_search
|
||||
// finishes the cursor will be put back on the match.
|
||||
is_state->search_start = t;
|
||||
(void)decl(&is_state->search_start);
|
||||
}
|
||||
else if (c == Ctrl_G && firstc == '?')
|
||||
{
|
||||
// Move just after the current match, so that when nv_search
|
||||
// finishes the cursor will be put back on the match.
|
||||
is_state->search_start = t;
|
||||
(void)incl(&is_state->search_start);
|
||||
}
|
||||
if (LT_POS(t, is_state->search_start) && c == Ctrl_G)
|
||||
{
|
||||
// wrap around
|
||||
is_state->search_start = t;
|
||||
if (firstc == '?')
|
||||
(void)incl(&is_state->search_start);
|
||||
else
|
||||
(void)decl(&is_state->search_start);
|
||||
}
|
||||
|
||||
set_search_match(&is_state->match_end);
|
||||
curwin->w_cursor = is_state->match_start;
|
||||
changed_cline_bef_curs();
|
||||
update_topline();
|
||||
validate_cursor();
|
||||
highlight_match = TRUE;
|
||||
save_viewstate(&is_state->old_viewstate);
|
||||
update_screen(NOT_VALID);
|
||||
redrawcmdline();
|
||||
}
|
||||
else
|
||||
vim_beep(BO_ERROR);
|
||||
restore_last_search_pattern();
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* When CTRL-L typed: add character from the match to the pattern.
|
||||
* May set "*c" to the added character.
|
||||
* Return OK when jumping to cmdline_not_changed.
|
||||
*/
|
||||
static int
|
||||
may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state)
|
||||
{
|
||||
int skiplen, patlen;
|
||||
|
||||
if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
|
||||
return FAIL;
|
||||
|
||||
// Add a character from under the cursor for 'incsearch'.
|
||||
if (is_state->did_incsearch)
|
||||
{
|
||||
curwin->w_cursor = is_state->match_end;
|
||||
if (!EQUAL_POS(curwin->w_cursor, is_state->search_start))
|
||||
{
|
||||
*c = gchar_cursor();
|
||||
|
||||
// If 'ignorecase' and 'smartcase' are set and the
|
||||
// command line has no uppercase characters, convert
|
||||
// the character to lowercase.
|
||||
if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff + skiplen))
|
||||
*c = MB_TOLOWER(*c);
|
||||
if (*c != NUL)
|
||||
{
|
||||
if (*c == firstc || vim_strchr((char_u *)(
|
||||
p_magic ? "\\~^$.*[" : "\\^$"), *c) != NULL)
|
||||
{
|
||||
// put a backslash before special characters
|
||||
stuffcharReadbuff(*c);
|
||||
*c = '\\';
|
||||
}
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -262,14 +725,7 @@ getcmdline(
|
||||
int histype; /* history type to be used */
|
||||
#endif
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
pos_T search_start; /* where 'incsearch' starts searching */
|
||||
pos_T save_cursor;
|
||||
viewstate_T init_viewstate;
|
||||
viewstate_T old_viewstate;
|
||||
pos_T match_start = curwin->w_cursor;
|
||||
pos_T match_end;
|
||||
int did_incsearch = FALSE;
|
||||
int incsearch_postponed = FALSE;
|
||||
incsearch_state_T is_state;
|
||||
#endif
|
||||
int did_wild_list = FALSE; /* did wild_list() recently */
|
||||
int wim_index = 0; /* index in wim_flags[] */
|
||||
@@ -287,7 +743,7 @@ getcmdline(
|
||||
#endif
|
||||
expand_T xpc;
|
||||
long *b_im_ptr = NULL;
|
||||
#if defined(FEAT_WILDMENU) || defined(FEAT_EVAL) || defined(FEAT_SEARCH_EXTRA)
|
||||
#if defined(FEAT_WILDMENU) || defined(FEAT_EVAL)
|
||||
/* Everything that may work recursively should save and restore the
|
||||
* current command line in save_ccline. That includes update_screen(), a
|
||||
* custom status line may invoke ":normal". */
|
||||
@@ -309,12 +765,9 @@ getcmdline(
|
||||
#endif
|
||||
|
||||
ccline.overstrike = FALSE; /* always start in insert mode */
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
CLEAR_POS(&match_end);
|
||||
save_cursor = curwin->w_cursor; /* may be restored later */
|
||||
search_start = curwin->w_cursor;
|
||||
save_viewstate(&init_viewstate);
|
||||
save_viewstate(&old_viewstate);
|
||||
init_incsearch_state(&is_state);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -1089,10 +1542,10 @@ getcmdline(
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (ccline.cmdlen == 0)
|
||||
{
|
||||
search_start = save_cursor;
|
||||
is_state.search_start = is_state.save_cursor;
|
||||
/* save view settings, so that the screen
|
||||
* won't be restored at the wrong position */
|
||||
old_viewstate = init_viewstate;
|
||||
is_state.old_viewstate = is_state.init_viewstate;
|
||||
}
|
||||
#endif
|
||||
redrawcmd();
|
||||
@@ -1121,7 +1574,7 @@ getcmdline(
|
||||
}
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (ccline.cmdlen == 0)
|
||||
search_start = save_cursor;
|
||||
is_state.search_start = is_state.save_cursor;
|
||||
#endif
|
||||
redraw_cmdline = TRUE;
|
||||
goto returncmd; /* back to cmd mode */
|
||||
@@ -1208,7 +1661,7 @@ getcmdline(
|
||||
ccline.cmdbuff[ccline.cmdlen] = NUL;
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (ccline.cmdlen == 0)
|
||||
search_start = save_cursor;
|
||||
is_state.search_start = is_state.save_cursor;
|
||||
#endif
|
||||
redrawcmd();
|
||||
goto cmdline_changed;
|
||||
@@ -1554,38 +2007,8 @@ getcmdline(
|
||||
|
||||
case Ctrl_L:
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
|
||||
{
|
||||
/* Add a character from under the cursor for 'incsearch' */
|
||||
if (did_incsearch)
|
||||
{
|
||||
curwin->w_cursor = match_end;
|
||||
if (!EQUAL_POS(curwin->w_cursor, search_start))
|
||||
{
|
||||
c = gchar_cursor();
|
||||
/* If 'ignorecase' and 'smartcase' are set and the
|
||||
* command line has no uppercase characters, convert
|
||||
* the character to lowercase */
|
||||
if (p_ic && p_scs
|
||||
&& !pat_has_uppercase(ccline.cmdbuff))
|
||||
c = MB_TOLOWER(c);
|
||||
if (c != NUL)
|
||||
{
|
||||
if (c == firstc || vim_strchr((char_u *)(
|
||||
p_magic ? "\\~^$.*[" : "\\^$"), c)
|
||||
!= NULL)
|
||||
{
|
||||
/* put a backslash before special
|
||||
* characters */
|
||||
stuffcharReadbuff(c);
|
||||
c = '\\';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (may_add_char_to_search(firstc, &c, &is_state) == OK)
|
||||
goto cmdline_not_changed;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* completion: longest common part */
|
||||
@@ -1751,88 +2174,9 @@ getcmdline(
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
case Ctrl_G: /* next match */
|
||||
case Ctrl_T: /* previous match */
|
||||
if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
|
||||
{
|
||||
pos_T t;
|
||||
char_u *pat;
|
||||
int search_flags = SEARCH_NOOF;
|
||||
|
||||
if (ccline.cmdlen == 0)
|
||||
goto cmdline_not_changed;
|
||||
|
||||
if (firstc == ccline.cmdbuff[0])
|
||||
pat = last_search_pattern();
|
||||
else
|
||||
pat = ccline.cmdbuff;
|
||||
|
||||
save_last_search_pattern();
|
||||
cursor_off();
|
||||
out_flush();
|
||||
if (c == Ctrl_G)
|
||||
{
|
||||
t = match_end;
|
||||
if (LT_POS(match_start, match_end))
|
||||
/* start searching at the end of the match
|
||||
* not at the beginning of the next column */
|
||||
(void)decl(&t);
|
||||
search_flags += SEARCH_COL;
|
||||
}
|
||||
else
|
||||
t = match_start;
|
||||
if (!p_hls)
|
||||
search_flags += SEARCH_KEEP;
|
||||
++emsg_off;
|
||||
i = searchit(curwin, curbuf, &t,
|
||||
c == Ctrl_G ? FORWARD : BACKWARD,
|
||||
pat, count, search_flags,
|
||||
RE_SEARCH, 0, NULL, NULL);
|
||||
--emsg_off;
|
||||
if (i)
|
||||
{
|
||||
search_start = match_start;
|
||||
match_end = t;
|
||||
match_start = t;
|
||||
if (c == Ctrl_T && firstc == '/')
|
||||
{
|
||||
/* move just before the current match, so that
|
||||
* when nv_search finishes the cursor will be
|
||||
* put back on the match */
|
||||
search_start = t;
|
||||
(void)decl(&search_start);
|
||||
}
|
||||
else if (c == Ctrl_G && firstc == '?')
|
||||
{
|
||||
/* move just after the current match, so that
|
||||
* when nv_search finishes the cursor will be
|
||||
* put back on the match */
|
||||
search_start = t;
|
||||
(void)incl(&search_start);
|
||||
}
|
||||
if (LT_POS(t, search_start) && c == Ctrl_G)
|
||||
{
|
||||
/* wrap around */
|
||||
search_start = t;
|
||||
if (firstc == '?')
|
||||
(void)incl(&search_start);
|
||||
else
|
||||
(void)decl(&search_start);
|
||||
}
|
||||
|
||||
set_search_match(&match_end);
|
||||
curwin->w_cursor = match_start;
|
||||
changed_cline_bef_curs();
|
||||
update_topline();
|
||||
validate_cursor();
|
||||
highlight_match = TRUE;
|
||||
save_viewstate(&old_viewstate);
|
||||
update_screen(NOT_VALID);
|
||||
redrawcmdline();
|
||||
}
|
||||
else
|
||||
vim_beep(BO_ERROR);
|
||||
restore_last_search_pattern();
|
||||
if (may_adjust_incsearch_highlighting(
|
||||
firstc, count, &is_state, c) == FAIL)
|
||||
goto cmdline_not_changed;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -1960,7 +2304,7 @@ getcmdline(
|
||||
*/
|
||||
cmdline_not_changed:
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (!incsearch_postponed)
|
||||
if (!is_state.incsearch_postponed)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
@@ -1969,115 +2313,7 @@ cmdline_changed:
|
||||
trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
/*
|
||||
* 'incsearch' highlighting.
|
||||
*/
|
||||
if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
|
||||
{
|
||||
pos_T end_pos;
|
||||
#ifdef FEAT_RELTIME
|
||||
proftime_T tm;
|
||||
#endif
|
||||
|
||||
/* if there is a character waiting, search and redraw later */
|
||||
if (char_avail())
|
||||
{
|
||||
incsearch_postponed = TRUE;
|
||||
continue;
|
||||
}
|
||||
incsearch_postponed = FALSE;
|
||||
curwin->w_cursor = search_start; /* start at old position */
|
||||
save_last_search_pattern();
|
||||
|
||||
/* If there is no command line, don't do anything */
|
||||
if (ccline.cmdlen == 0)
|
||||
{
|
||||
i = 0;
|
||||
set_no_hlsearch(TRUE); /* turn off previous highlight */
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
else
|
||||
{
|
||||
int search_flags = SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK;
|
||||
cursor_off(); /* so the user knows we're busy */
|
||||
out_flush();
|
||||
++emsg_off; /* So it doesn't beep if bad expr */
|
||||
#ifdef FEAT_RELTIME
|
||||
/* Set the time limit to half a second. */
|
||||
profile_setlimit(500L, &tm);
|
||||
#endif
|
||||
if (!p_hls)
|
||||
search_flags += SEARCH_KEEP;
|
||||
i = do_search(NULL, firstc, ccline.cmdbuff, count,
|
||||
search_flags,
|
||||
#ifdef FEAT_RELTIME
|
||||
&tm, NULL
|
||||
#else
|
||||
NULL, NULL
|
||||
#endif
|
||||
);
|
||||
--emsg_off;
|
||||
/* if interrupted while searching, behave like it failed */
|
||||
if (got_int)
|
||||
{
|
||||
(void)vpeekc(); /* remove <C-C> from input stream */
|
||||
got_int = FALSE; /* don't abandon the command line */
|
||||
i = 0;
|
||||
}
|
||||
else if (char_avail())
|
||||
/* cancelled searching because a char was typed */
|
||||
incsearch_postponed = TRUE;
|
||||
}
|
||||
if (i != 0)
|
||||
highlight_match = TRUE; /* highlight position */
|
||||
else
|
||||
highlight_match = FALSE; /* remove highlight */
|
||||
|
||||
/* first restore the old curwin values, so the screen is
|
||||
* positioned in the same way as the actual search command */
|
||||
restore_viewstate(&old_viewstate);
|
||||
changed_cline_bef_curs();
|
||||
update_topline();
|
||||
|
||||
if (i != 0)
|
||||
{
|
||||
pos_T save_pos = curwin->w_cursor;
|
||||
|
||||
match_start = curwin->w_cursor;
|
||||
set_search_match(&curwin->w_cursor);
|
||||
validate_cursor();
|
||||
end_pos = curwin->w_cursor;
|
||||
match_end = end_pos;
|
||||
curwin->w_cursor = save_pos;
|
||||
}
|
||||
else
|
||||
end_pos = curwin->w_cursor; /* shutup gcc 4 */
|
||||
|
||||
/* Disable 'hlsearch' highlighting if the pattern matches
|
||||
* everything. Avoids a flash when typing "foo\|". */
|
||||
if (empty_pattern(ccline.cmdbuff))
|
||||
set_no_hlsearch(TRUE);
|
||||
|
||||
validate_cursor();
|
||||
/* May redraw the status line to show the cursor position. */
|
||||
if (p_ru && curwin->w_status_height > 0)
|
||||
curwin->w_redr_status = TRUE;
|
||||
|
||||
save_cmdline(&save_ccline);
|
||||
update_screen(SOME_VALID);
|
||||
restore_cmdline(&save_ccline);
|
||||
restore_last_search_pattern();
|
||||
|
||||
/* Leave it at the end to make CTRL-R CTRL-W work. */
|
||||
if (i != 0)
|
||||
curwin->w_cursor = end_pos;
|
||||
|
||||
msg_starthere();
|
||||
redrawcmdline();
|
||||
did_incsearch = TRUE;
|
||||
}
|
||||
#else /* FEAT_SEARCH_EXTRA */
|
||||
;
|
||||
may_do_incsearch_highlighting(firstc, count, &is_state);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
@@ -2109,25 +2345,7 @@ returncmd:
|
||||
ccline.xpc = NULL;
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (did_incsearch)
|
||||
{
|
||||
if (gotesc)
|
||||
curwin->w_cursor = save_cursor;
|
||||
else
|
||||
{
|
||||
if (!EQUAL_POS(save_cursor, search_start))
|
||||
{
|
||||
/* put the '" mark at the original position */
|
||||
curwin->w_cursor = save_cursor;
|
||||
setpcmark();
|
||||
}
|
||||
curwin->w_cursor = search_start;
|
||||
}
|
||||
restore_viewstate(&old_viewstate);
|
||||
highlight_match = FALSE;
|
||||
validate_cursor(); /* needed for TAB */
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
finish_incsearch_highlighting(gotesc, &is_state, FALSE);
|
||||
#endif
|
||||
|
||||
if (ccline.cmdbuff != NULL)
|
||||
@@ -7254,21 +7472,3 @@ script_get(exarg_T *eap, char_u *cmd)
|
||||
|
||||
return (char_u *)ga.ga_data;
|
||||
}
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
static void
|
||||
set_search_match(pos_T *t)
|
||||
{
|
||||
/*
|
||||
* First move cursor to end of match, then to the start. This
|
||||
* moves the whole match onto the screen when 'nowrap' is set.
|
||||
*/
|
||||
t->lnum += search_match_lines;
|
||||
t->col = search_match_endcol;
|
||||
if (t->lnum > curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
t->lnum = curbuf->b_ml.ml_line_count;
|
||||
coladvance((colnr_T)MAXCOL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+42
-28
@@ -424,12 +424,8 @@ readfile(
|
||||
*/
|
||||
perm = mch_getperm(fname);
|
||||
if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
|
||||
# ifdef S_ISFIFO
|
||||
&& !S_ISFIFO(perm) /* ... or fifo */
|
||||
# endif
|
||||
# ifdef S_ISSOCK
|
||||
&& !S_ISSOCK(perm) /* ... or socket */
|
||||
# endif
|
||||
# ifdef OPEN_CHR_FILES
|
||||
&& !(S_ISCHR(perm) && is_dev_fd_file(fname))
|
||||
/* ... or a character special file named /dev/fd/<n> */
|
||||
@@ -2497,28 +2493,16 @@ failed:
|
||||
c = FALSE;
|
||||
|
||||
#ifdef UNIX
|
||||
# ifdef S_ISFIFO
|
||||
if (S_ISFIFO(perm)) /* fifo or socket */
|
||||
{
|
||||
STRCAT(IObuff, _("[fifo/socket]"));
|
||||
c = TRUE;
|
||||
}
|
||||
# else
|
||||
# ifdef S_IFIFO
|
||||
if ((perm & S_IFMT) == S_IFIFO) /* fifo */
|
||||
if (S_ISFIFO(perm)) /* fifo */
|
||||
{
|
||||
STRCAT(IObuff, _("[fifo]"));
|
||||
c = TRUE;
|
||||
}
|
||||
# endif
|
||||
# ifdef S_IFSOCK
|
||||
if ((perm & S_IFMT) == S_IFSOCK) /* or socket */
|
||||
if (S_ISSOCK(perm)) /* or socket */
|
||||
{
|
||||
STRCAT(IObuff, _("[socket]"));
|
||||
c = TRUE;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# ifdef OPEN_CHR_FILES
|
||||
if (S_ISCHR(perm)) /* or character special */
|
||||
{
|
||||
@@ -3850,6 +3834,9 @@ buf_write(
|
||||
stat_T st_new;
|
||||
char_u *dirp;
|
||||
char_u *rootname;
|
||||
#if defined(UNIX) || defined(WIN3264)
|
||||
char_u *p;
|
||||
#endif
|
||||
#if defined(UNIX)
|
||||
int did_set_shortname;
|
||||
mode_t umask_save;
|
||||
@@ -3887,6 +3874,17 @@ buf_write(
|
||||
* Isolate one directory name, using an entry in 'bdir'.
|
||||
*/
|
||||
(void)copy_option_part(&dirp, copybuf, BUFSIZE, ",");
|
||||
|
||||
#if defined(UNIX) || defined(WIN3264)
|
||||
p = copybuf + STRLEN(copybuf);
|
||||
if (after_pathsep(copybuf, p) && p[-1] == p[-2])
|
||||
// Ends with '//', use full path
|
||||
if ((p = make_percent_swname(copybuf, fname)) != NULL)
|
||||
{
|
||||
backup = modname(p, backup_ext, FALSE);
|
||||
vim_free(p);
|
||||
}
|
||||
#endif
|
||||
rootname = get_file_in_dir(fname, copybuf);
|
||||
if (rootname == NULL)
|
||||
{
|
||||
@@ -3904,9 +3902,10 @@ buf_write(
|
||||
for (;;)
|
||||
{
|
||||
/*
|
||||
* Make backup file name.
|
||||
* Make the backup file name.
|
||||
*/
|
||||
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
|
||||
if (backup == NULL)
|
||||
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
|
||||
rootname, backup_ext, FALSE);
|
||||
if (backup == NULL)
|
||||
{
|
||||
@@ -4108,14 +4107,29 @@ buf_write(
|
||||
* Isolate one directory name and make the backup file name.
|
||||
*/
|
||||
(void)copy_option_part(&dirp, IObuff, IOSIZE, ",");
|
||||
rootname = get_file_in_dir(fname, IObuff);
|
||||
if (rootname == NULL)
|
||||
backup = NULL;
|
||||
else
|
||||
|
||||
#if defined(UNIX) || defined(WIN3264)
|
||||
p = IObuff + STRLEN(IObuff);
|
||||
if (after_pathsep(IObuff, p) && p[-1] == p[-2])
|
||||
// path ends with '//', use full path
|
||||
if ((p = make_percent_swname(IObuff, fname)) != NULL)
|
||||
{
|
||||
backup = modname(p, backup_ext, FALSE);
|
||||
vim_free(p);
|
||||
}
|
||||
#endif
|
||||
if (backup == NULL)
|
||||
{
|
||||
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
|
||||
rootname, backup_ext, FALSE);
|
||||
vim_free(rootname);
|
||||
rootname = get_file_in_dir(fname, IObuff);
|
||||
if (rootname == NULL)
|
||||
backup = NULL;
|
||||
else
|
||||
{
|
||||
backup = buf_modname(
|
||||
(buf->b_p_sn || buf->b_shortname),
|
||||
rootname, backup_ext, FALSE);
|
||||
vim_free(rootname);
|
||||
}
|
||||
}
|
||||
|
||||
if (backup != NULL)
|
||||
@@ -6257,7 +6271,7 @@ shorten_filenames(char_u **fnames, int count)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* add extension to file name - change path/fo.o.h to path/fo.o.h.ext or
|
||||
* Add extension to file name - change path/fo.o.h to path/fo.o.h.ext or
|
||||
* fo_o_h.ext for MSDOS or when shortname option set.
|
||||
*
|
||||
* Assumed that fname is a valid name found in the filesystem we assure that
|
||||
|
||||
+7
-3
@@ -345,9 +345,13 @@ EXTERN int t_colors INIT(= 0); /* int value of T_CCO */
|
||||
* a match within one line), search_match_endcol the column number of the
|
||||
* character just after the match in the last line.
|
||||
*/
|
||||
EXTERN int highlight_match INIT(= FALSE); /* show search match pos */
|
||||
EXTERN linenr_T search_match_lines; /* lines of of matched string */
|
||||
EXTERN colnr_T search_match_endcol; /* col nr of match end */
|
||||
EXTERN int highlight_match INIT(= FALSE); // show search match pos
|
||||
EXTERN linenr_T search_match_lines; // lines of of matched string
|
||||
EXTERN colnr_T search_match_endcol; // col nr of match end
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
EXTERN linenr_T search_first_line INIT(= 0); // for :{FIRST},{last}s/pat
|
||||
EXTERN linenr_T search_last_line INIT(= MAXLNUM); // for :{first},{LAST}s/pat
|
||||
#endif
|
||||
|
||||
EXTERN int no_smartcase INIT(= FALSE); /* don't use 'smartcase' once */
|
||||
|
||||
|
||||
@@ -1621,16 +1621,6 @@ gui_set_shellsize(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
if (!mustset && (vim_strchr(p_go, GO_KEEPWINSIZE) != NULL))
|
||||
{
|
||||
/* We don't want to resize the window, so instruct the GUI to resize
|
||||
* the view to be within the constraints of the current window's size */
|
||||
gui_mch_resize_view();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
base_width = gui_get_base_width();
|
||||
base_height = gui_get_base_height();
|
||||
if (fit_to_display)
|
||||
|
||||
@@ -788,6 +788,29 @@ property_event(GtkWidget *widget,
|
||||
}
|
||||
#endif /* defined(FEAT_CLIENTSERVER) */
|
||||
|
||||
/*
|
||||
* Handle changes to the "Xft/DPI" setting
|
||||
*/
|
||||
static void
|
||||
gtk_settings_xft_dpi_changed_cb(GtkSettings *gtk_settings UNUSED,
|
||||
GParamSpec *pspec UNUSED,
|
||||
gpointer data UNUSED)
|
||||
{
|
||||
// Create a new PangoContext for this screen, and initialize it
|
||||
// with the current font if necessary.
|
||||
if (gui.text_context != NULL)
|
||||
g_object_unref(gui.text_context);
|
||||
|
||||
gui.text_context = gtk_widget_create_pango_context(gui.mainwin);
|
||||
pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR);
|
||||
|
||||
if (gui.norm_font != NULL)
|
||||
{
|
||||
// force default font
|
||||
gui_mch_init_font(*p_guifont == NUL ? NULL : p_guifont, FALSE);
|
||||
gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
|
||||
}
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
typedef gboolean timeout_cb_type;
|
||||
@@ -4383,6 +4406,15 @@ gui_mch_init(void)
|
||||
/* Pretend we don't have input focus, we will get an event if we do. */
|
||||
gui.in_focus = FALSE;
|
||||
|
||||
// Handle changes to the "Xft/DPI" setting.
|
||||
{
|
||||
GtkSettings *gtk_settings =
|
||||
gtk_settings_get_for_screen(gdk_screen_get_default());
|
||||
|
||||
g_signal_connect(gtk_settings, "notify::gtk-xft-dpi",
|
||||
G_CALLBACK(gtk_settings_xft_dpi_changed_cb), NULL);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
+1
-6
@@ -550,7 +550,7 @@ staterr:
|
||||
}
|
||||
|
||||
/* if filename is a directory, append the cscope database name to it */
|
||||
if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
|
||||
if (S_ISDIR(statbuf.st_mode))
|
||||
{
|
||||
fname2 = (char *)alloc((unsigned)(strlen(CSCOPE_DBFILE) + strlen(fname) + 2));
|
||||
if (fname2 == NULL)
|
||||
@@ -581,12 +581,7 @@ staterr:
|
||||
|
||||
i = cs_insert_filelist(fname2, ppath, flags, &statbuf);
|
||||
}
|
||||
#if defined(UNIX)
|
||||
else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode))
|
||||
#else
|
||||
/* WIN32 - substitute define S_ISREG from os_unix.h */
|
||||
else if (((statbuf.st_mode) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
{
|
||||
i = cs_insert_filelist(fname, ppath, flags, &statbuf);
|
||||
}
|
||||
|
||||
+60
-29
@@ -544,27 +544,57 @@ PythonIO_Init_io(void)
|
||||
}
|
||||
|
||||
#if PY_VERSION_HEX < 0x030700f0
|
||||
static PyObject *call_load_module(char *name, int len, PyObject *find_module_result);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PyObject_HEAD
|
||||
PyObject *module;
|
||||
char *fullname;
|
||||
PyObject *result;
|
||||
} LoaderObject;
|
||||
static PyTypeObject LoaderType;
|
||||
|
||||
static void
|
||||
LoaderDestructor(LoaderObject *self)
|
||||
{
|
||||
Py_DECREF(self->module);
|
||||
vim_free(self->fullname);
|
||||
Py_XDECREF(self->result);
|
||||
DESTRUCTOR_FINISH(self);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
LoaderLoadModule(LoaderObject *self, PyObject *args UNUSED)
|
||||
{
|
||||
PyObject *ret = self->module;
|
||||
char *fullname = self->fullname;
|
||||
PyObject *result = self->result;
|
||||
PyObject *module;
|
||||
|
||||
Py_INCREF(ret);
|
||||
return ret;
|
||||
if (!fullname)
|
||||
{
|
||||
module = result ? result : Py_None;
|
||||
Py_INCREF(module);
|
||||
return module;
|
||||
}
|
||||
|
||||
module = call_load_module(fullname, (int)STRLEN(fullname), result);
|
||||
|
||||
self->fullname = NULL;
|
||||
self->result = module;
|
||||
|
||||
vim_free(fullname);
|
||||
Py_DECREF(result);
|
||||
|
||||
if (!module)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
Py_INCREF(module);
|
||||
return module;
|
||||
}
|
||||
|
||||
static struct PyMethodDef LoaderMethods[] = {
|
||||
@@ -1252,7 +1282,11 @@ find_module(char *fullname, char *tail, PyObject *new_path)
|
||||
|
||||
if (!(find_module_result = PyObject_CallFunction(py_find_module,
|
||||
"s#O", tail, partlen, new_path)))
|
||||
{
|
||||
if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_ImportError))
|
||||
PyErr_Clear();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(module = call_load_module(
|
||||
fullname,
|
||||
@@ -1273,30 +1307,23 @@ find_module(char *fullname, char *tail, PyObject *new_path)
|
||||
|
||||
Py_DECREF(module);
|
||||
|
||||
module = find_module(fullname, dot + 1, newest_path);
|
||||
find_module_result = find_module(fullname, dot + 1, newest_path);
|
||||
|
||||
Py_DECREF(newest_path);
|
||||
|
||||
return module;
|
||||
return find_module_result;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(find_module_result = PyObject_CallFunction(py_find_module,
|
||||
"sO", tail, new_path)))
|
||||
return NULL;
|
||||
|
||||
if (!(module = call_load_module(
|
||||
fullname,
|
||||
(int)STRLEN(fullname),
|
||||
find_module_result)))
|
||||
{
|
||||
Py_DECREF(find_module_result);
|
||||
if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_ImportError))
|
||||
PyErr_Clear();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Py_DECREF(find_module_result);
|
||||
|
||||
return module;
|
||||
return find_module_result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,7 +1331,7 @@ find_module(char *fullname, char *tail, PyObject *new_path)
|
||||
FinderFindModule(PyObject *self, PyObject *args)
|
||||
{
|
||||
char *fullname;
|
||||
PyObject *module;
|
||||
PyObject *result;
|
||||
PyObject *new_path;
|
||||
LoaderObject *loader;
|
||||
|
||||
@@ -1314,31 +1341,35 @@ FinderFindModule(PyObject *self, PyObject *args)
|
||||
if (!(new_path = Vim_GetPaths(self)))
|
||||
return NULL;
|
||||
|
||||
module = find_module(fullname, fullname, new_path);
|
||||
result = find_module(fullname, fullname, new_path);
|
||||
|
||||
Py_DECREF(new_path);
|
||||
|
||||
if (!module)
|
||||
if (!result)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
if (PyErr_ExceptionMatches(PyExc_ImportError))
|
||||
PyErr_Clear();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
if (!(loader = PyObject_NEW(LoaderObject, &LoaderType)))
|
||||
if (!(fullname = (char *)vim_strsave((char_u *)fullname)))
|
||||
{
|
||||
Py_DECREF(module);
|
||||
Py_DECREF(result);
|
||||
PyErr_NoMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
loader->module = module;
|
||||
if (!(loader = PyObject_NEW(LoaderObject, &LoaderType)))
|
||||
{
|
||||
vim_free(fullname);
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
loader->fullname = fullname;
|
||||
loader->result = result;
|
||||
|
||||
return (PyObject *) loader;
|
||||
}
|
||||
|
||||
+24
-14
@@ -253,11 +253,12 @@ static void ruby_vim_init(void);
|
||||
# define rb_hash_new dll_rb_hash_new
|
||||
# define rb_inspect dll_rb_inspect
|
||||
# define rb_int2inum dll_rb_int2inum
|
||||
# ifdef RUBY19_OR_LATER
|
||||
# define rb_intern2 dll_rb_intern2
|
||||
# else
|
||||
# define rb_intern dll_rb_intern
|
||||
# endif
|
||||
|
||||
// ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
|
||||
// work. Not using the cache appears to be the best solution.
|
||||
# undef rb_intern
|
||||
# define rb_intern dll_rb_intern
|
||||
|
||||
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
|
||||
# define rb_fix2int dll_rb_fix2int
|
||||
@@ -298,6 +299,11 @@ static void ruby_vim_init(void);
|
||||
# define rb_string_value_ptr dll_rb_string_value_ptr
|
||||
# define rb_float_new dll_rb_float_new
|
||||
# define rb_ary_new dll_rb_ary_new
|
||||
# ifdef rb_ary_new4
|
||||
# define RB_ARY_NEW4_MACRO 1
|
||||
# undef rb_ary_new4
|
||||
# endif
|
||||
# define rb_ary_new4 dll_rb_ary_new4
|
||||
# define rb_ary_push dll_rb_ary_push
|
||||
# if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
|
||||
# ifdef __ia64
|
||||
@@ -392,11 +398,7 @@ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
|
||||
static VALUE (*dll_rb_hash_new) (void);
|
||||
static VALUE (*dll_rb_inspect) (VALUE);
|
||||
static VALUE (*dll_rb_int2inum) (long);
|
||||
# ifdef RUBY19_OR_LATER
|
||||
static ID (*dll_rb_intern2) (const char*, long);
|
||||
# else
|
||||
static ID (*dll_rb_intern) (const char*);
|
||||
# endif
|
||||
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
|
||||
static long (*dll_rb_fix2int) (VALUE);
|
||||
static long (*dll_rb_num2int) (VALUE);
|
||||
@@ -444,6 +446,7 @@ static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
|
||||
static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
|
||||
static VALUE (*dll_rb_float_new) (double);
|
||||
static VALUE (*dll_rb_ary_new) (void);
|
||||
static VALUE (*dll_rb_ary_new4) (long n, const VALUE *elts);
|
||||
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
|
||||
# if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
|
||||
# ifdef __ia64
|
||||
@@ -596,11 +599,7 @@ static struct
|
||||
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
|
||||
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
|
||||
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
|
||||
# ifdef RUBY19_OR_LATER
|
||||
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
|
||||
# else
|
||||
{"rb_intern", (RUBY_PROC*)&dll_rb_intern},
|
||||
# endif
|
||||
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
|
||||
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
|
||||
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
|
||||
@@ -654,6 +653,11 @@ static struct
|
||||
{"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new},
|
||||
# endif
|
||||
{"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
|
||||
# ifdef RB_ARY_NEW4_MACRO
|
||||
{"rb_ary_new_from_values", (RUBY_PROC*)&dll_rb_ary_new4},
|
||||
# else
|
||||
{"rb_ary_new4", (RUBY_PROC*)&dll_rb_ary_new4},
|
||||
# endif
|
||||
{"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
|
||||
# endif
|
||||
# ifdef RUBY19_OR_LATER
|
||||
@@ -1584,6 +1588,7 @@ static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
|
||||
{
|
||||
int i;
|
||||
VALUE str = rb_str_new("", 0);
|
||||
VALUE ret = Qnil;
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
@@ -1591,7 +1596,12 @@ static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
|
||||
rb_str_concat(str, rb_inspect(argv[i]));
|
||||
}
|
||||
MSG(RSTRING_PTR(str));
|
||||
return Qnil;
|
||||
|
||||
if (argc == 1)
|
||||
ret = argv[0];
|
||||
else if (argc > 1)
|
||||
ret = rb_ary_new4(argc, argv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ruby_io_init(void)
|
||||
|
||||
@@ -729,6 +729,10 @@ vim_main2(void)
|
||||
scroll_region_reset(); /* In case Rows changed */
|
||||
scroll_start(); /* may scroll the screen to the right position */
|
||||
|
||||
#if defined(FEAT_TITLE) && (defined(UNIX) || defined(VMS) || defined(MACOS_X))
|
||||
term_push_title(SAVE_RESTORE_BOTH);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Don't clear the screen when starting in Ex mode, unless using the GUI.
|
||||
*/
|
||||
|
||||
+5
-10
@@ -262,9 +262,6 @@ static int fnamecmp_ino(char_u *, char_u *, long);
|
||||
#endif
|
||||
static void long_to_char(long, char_u *);
|
||||
static long char_to_long(char_u *);
|
||||
#if defined(UNIX) || defined(WIN3264)
|
||||
static char_u *make_percent_swname(char_u *dir, char_u *name);
|
||||
#endif
|
||||
#ifdef FEAT_CRYPT
|
||||
static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading);
|
||||
#endif
|
||||
@@ -2007,18 +2004,18 @@ recover_names(
|
||||
return file_count;
|
||||
}
|
||||
|
||||
#if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */
|
||||
#if defined(UNIX) || defined(WIN3264) || defined(PROTO)
|
||||
/*
|
||||
* Need _very_ long file names.
|
||||
* Append the full path to name with path separators made into percent
|
||||
* signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"")
|
||||
*/
|
||||
static char_u *
|
||||
char_u *
|
||||
make_percent_swname(char_u *dir, char_u *name)
|
||||
{
|
||||
char_u *d, *s, *f;
|
||||
char_u *d = NULL, *s, *f;
|
||||
|
||||
f = fix_fname(name != NULL ? name : (char_u *) "");
|
||||
d = NULL;
|
||||
f = fix_fname(name != NULL ? name : (char_u *)"");
|
||||
if (f != NULL)
|
||||
{
|
||||
s = alloc((unsigned)(STRLEN(f) + 1));
|
||||
@@ -4070,8 +4067,6 @@ attention_message(
|
||||
}
|
||||
|
||||
#if defined(FEAT_EVAL)
|
||||
static int do_swapexists(buf_T *buf, char_u *fname);
|
||||
|
||||
/*
|
||||
* Trigger the SwapExists autocommands.
|
||||
* Returns a value for equivalent to do_dialog() (see below):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user