mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ff38b0d07 | |||
| e3f9841f59 | |||
| 1de4548643 | |||
| fd114bd289 | |||
| b115d75a66 | |||
| 4f653a19c5 | |||
| 2fb08d3456 | |||
| 675446da32 | |||
| 3421566376 | |||
| 079c0c9d4a | |||
| a899e6ecc4 | |||
| 3fad98e8af | |||
| a2477fd349 | |||
| 5643db84c6 | |||
| 21efc3633e | |||
| d96d409df8 | |||
| 99c5eb4fd7 | |||
| 5162822914 | |||
| cf49790443 | |||
| 327054df45 | |||
| 6dbf66aa3e | |||
| e3af763d5e | |||
| b04a98f6c3 | |||
| 87f3d202a9 | |||
| eca626fcdb | |||
| eebd84eb94 | |||
| 5a030a540f | |||
| b129a447f3 | |||
| 65e08ee1d2 | |||
| 958dc6923d |
@@ -5,6 +5,7 @@ src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/auto/gui_gtk_gresources.c
|
||||
src/auto/gui_gtk_gresources.h
|
||||
src/objects/.dirstamp
|
||||
src/tags
|
||||
|
||||
# We do need src/auto/configure.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GHC Haskell Compiler
|
||||
" Maintainer: Daniel Campoverde <alx@sillybytes.net>
|
||||
" Latest Revision: 2016-11-29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "ghc"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%-G%.%#:\ build,
|
||||
\%-G%.%#preprocessing\ library\ %.%#,
|
||||
\%-G[%.%#]%.%#,
|
||||
\%E%f:%l:%c:\ %m,
|
||||
\%-G--%.%#
|
||||
|
||||
if exists('g:compiler_ghc_ignore_unmatched_lines')
|
||||
CompilerSet errorformat+=%-G%.%#
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Nov 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -684,6 +684,7 @@ g& Synonym for `:%s//~/&` (repeat last substitute with
|
||||
*:s_flags*
|
||||
The flags that you can use for the substitute commands:
|
||||
|
||||
*:&&*
|
||||
[&] Must be the first one: Keep the flags from the previous substitute
|
||||
command. Examples: >
|
||||
:&&
|
||||
|
||||
+16
-11
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Nov 07
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -155,7 +155,13 @@ Use |ch_status()| to see if the channel could be opened.
|
||||
func MyCloseHandler(channel)
|
||||
< Vim will invoke callbacks that handle data before invoking
|
||||
close_cb, thus when this function is called no more data will
|
||||
be received.
|
||||
be passed to the callbacks.
|
||||
*channel-drop*
|
||||
"drop" Specifies when to drop messages:
|
||||
"auto" When there is no callback to handle a message.
|
||||
The "close_cb" is also considered for this.
|
||||
"never" All messages will be kept.
|
||||
|
||||
*waittime*
|
||||
"waittime" The time to wait for the connection to be made in
|
||||
milliseconds. A negative number waits forever.
|
||||
@@ -474,11 +480,6 @@ This depends on the system (on Unix this happens because closing the write end
|
||||
of a pipe causes the read end to get EOF). To avoid this make the job sleep
|
||||
for a short while before it exits.
|
||||
|
||||
Note that if the job exits before you read the output, the output may be lost.
|
||||
This depends on the system (on Unix this happens because closing the write end
|
||||
of a pipe causes the read end to get EOF). To avoid this make the job sleep
|
||||
for a short while before it exits.
|
||||
|
||||
The handler defined for "out_cb" will not receive stderr. If you want to
|
||||
handle that separately, add an "err_cb" handler: >
|
||||
let job = job_start(command, {"out_cb": "MyHandler",
|
||||
@@ -543,7 +544,7 @@ You will want to do something more useful than "echomsg".
|
||||
|
||||
To start another process without creating a channel: >
|
||||
let job = job_start(command,
|
||||
\ {"in_io": "null", "out_io": "null", "err_io": "null"})
|
||||
\ {"in_io": "null", "out_io": "null", "err_io": "null"})
|
||||
|
||||
This starts {command} in the background, Vim does not wait for it to finish.
|
||||
|
||||
@@ -605,6 +606,10 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"close_cb": handler Callback for when the channel is closed. Same as
|
||||
"close_cb" on |ch_open()|, see |close_cb|.
|
||||
*job-exit_cb*
|
||||
"drop" Specifies when to drop messages. Same as "drop" on
|
||||
|ch_open()|, see |channel-drop|. For "auto" the
|
||||
exit_cb is not considered.
|
||||
|
||||
"exit_cb": handler Callback for when the job ends. The arguments are the
|
||||
job and the exit status.
|
||||
Vim checks up to 10 times per second for jobs that
|
||||
@@ -638,7 +643,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"channel": {channel} Use an existing channel instead of creating a new one.
|
||||
The parts of the channel that get used for the new job
|
||||
will be disconnected from what they were used before.
|
||||
If the channel was still use by another job this may
|
||||
If the channel was still used by another job this may
|
||||
cause I/O errors.
|
||||
Existing callbacks and other settings remain.
|
||||
|
||||
@@ -656,7 +661,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"out_io": "null" disconnect stdout (goes to /dev/null)
|
||||
"out_io": "pipe" stdout is connected to the channel (default)
|
||||
"out_io": "file" stdout writes to a file
|
||||
"out_io": "buffer" stdout appends to a buffer (see below)
|
||||
"out_io": "buffer" stdout appends to a buffer (see below)
|
||||
"out_name": "/path/file" the name of the file or buffer to write to
|
||||
"out_buf": number the number of the buffer to write to
|
||||
"out_modifiable": 0 when writing to a buffer, 'modifiable' will be off
|
||||
@@ -669,7 +674,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"err_io": "null" disconnect stderr (goes to /dev/null)
|
||||
"err_io": "pipe" stderr is connected to the channel (default)
|
||||
"err_io": "file" stderr writes to a file
|
||||
"err_io": "buffer" stderr appends to a buffer (see below)
|
||||
"err_io": "buffer" stderr appends to a buffer (see below)
|
||||
"err_name": "/path/file" the name of the file or buffer to write to
|
||||
"err_buf": number the number of the buffer to write to
|
||||
"err_modifiable": 0 when writing to a buffer, 'modifiable' will be off
|
||||
|
||||
@@ -359,8 +359,11 @@ terminals)
|
||||
List entries 6 to 12 from the search history: >
|
||||
:history / 6,12
|
||||
<
|
||||
List the recent five entries from all histories: >
|
||||
:history all -5,
|
||||
List the penultimate entry from all histories: >
|
||||
:history all -2
|
||||
<
|
||||
List the most recent two entries from all histories: >
|
||||
:history all -2,
|
||||
|
||||
:keepp[atterns] {command} *:keepp* *:keeppatterns*
|
||||
Execute {command}, without adding anything to the search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -977,12 +977,12 @@ WRITING WITH MULTIPLE BUFFERS *buffer-write*
|
||||
|
||||
*:wa* *:wall*
|
||||
:wa[ll] Write all changed buffers. Buffers without a file
|
||||
name or which are readonly are not written. {not in
|
||||
Vi}
|
||||
name cause an error message. Buffers which are
|
||||
readonly are not written. {not in Vi}
|
||||
|
||||
:wa[ll]! Write all changed buffers, even the ones that are
|
||||
readonly. Buffers without a file name are not
|
||||
written. {not in Vi}
|
||||
written and cause an error message. {not in Vi}
|
||||
|
||||
|
||||
Vim will warn you if you try to overwrite a file that has been changed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Nov 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3084,7 +3084,7 @@ ch_log({msg} [, {handle}]) *ch_log()*
|
||||
|ch_logfile()|.
|
||||
When {handle} is passed the channel number is used for the
|
||||
message.
|
||||
{handle} can be Channel or a Job that has a Channel. The
|
||||
{handle} can be a Channel or a Job that has a Channel. The
|
||||
Channel must be open for the channel number to be used.
|
||||
|
||||
ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.0. Last change: 2016 Jul 12
|
||||
*motion.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -915,6 +915,7 @@ was made yet in the current file.
|
||||
then the position can be near the end of what the
|
||||
command changed. For example when inserting a word,
|
||||
the position will be on the last character.
|
||||
To jump to older changes use |g;|.
|
||||
{not in Vi}
|
||||
|
||||
*'(* *`(*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Nov 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -242,7 +242,7 @@ opt+=val" the expansion is done before the adding or removing.
|
||||
Handling of local options *local-options*
|
||||
|
||||
Some of the options only apply to a window or buffer. Each window or buffer
|
||||
has its own copy of this option, thus can each have their own value. This
|
||||
has its own copy of this option, thus each can have its own value. This
|
||||
allows you to set 'list' in one window but not in another. And set
|
||||
'shiftwidth' to 3 in one buffer and 4 in another.
|
||||
|
||||
@@ -3984,6 +3984,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
The format of this option is like that of 'statusline'.
|
||||
'guitabtooltip' is used for the tooltip, see below.
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|.
|
||||
|
||||
Only used when the GUI tab pages line is displayed. 'e' must be
|
||||
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
|
||||
@@ -5851,6 +5853,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
and |+postscript| features}
|
||||
Expression used to print the PostScript produced with |:hardcopy|.
|
||||
See |pexpr-option|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'printfont'* *'pfn'*
|
||||
'printfont' 'pfn' string (default "courier")
|
||||
@@ -8003,7 +8007,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Amiga console, Win32 console, all GUI versions and terminals with a
|
||||
non-empty 't_ts' option).
|
||||
When Vim was compiled with HAVE_X11 defined, the original title will
|
||||
be restored if possible |X11|.
|
||||
be restored if possible, see |X11|.
|
||||
When this option contains printf-style '%' items, they will be
|
||||
expanded according to the rules used for 'statusline'.
|
||||
Example: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.0. Last change: 2016 Sep 09
|
||||
*starting.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1378,6 +1378,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
--servername remote.txt /*--servername*
|
||||
--socketid starting.txt /*--socketid*
|
||||
--startuptime starting.txt /*--startuptime*
|
||||
--ttyfail starting.txt /*--ttyfail*
|
||||
--version starting.txt /*--version*
|
||||
--windowid starting.txt /*--windowid*
|
||||
-A starting.txt /*-A*
|
||||
@@ -1865,6 +1866,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:$ cmdline.txt /*:$*
|
||||
:% cmdline.txt /*:%*
|
||||
:& change.txt /*:&*
|
||||
:&& change.txt /*:&&*
|
||||
:' cmdline.txt /*:'*
|
||||
:, cmdline.txt /*:,*
|
||||
:. cmdline.txt /*:.*
|
||||
@@ -5302,6 +5304,7 @@ catch-text eval.txt /*catch-text*
|
||||
cc change.txt /*cc*
|
||||
ceil() eval.txt /*ceil()*
|
||||
ch.vim syntax.txt /*ch.vim*
|
||||
ch_canread() eval.txt /*ch_canread()*
|
||||
ch_close() eval.txt /*ch_close()*
|
||||
ch_close_in() eval.txt /*ch_close_in()*
|
||||
ch_evalexpr() eval.txt /*ch_evalexpr()*
|
||||
@@ -5349,6 +5352,7 @@ channel-close channel.txt /*channel-close*
|
||||
channel-close-in channel.txt /*channel-close-in*
|
||||
channel-commands channel.txt /*channel-commands*
|
||||
channel-demo channel.txt /*channel-demo*
|
||||
channel-drop channel.txt /*channel-drop*
|
||||
channel-functions usr_41.txt /*channel-functions*
|
||||
channel-mode channel.txt /*channel-mode*
|
||||
channel-more channel.txt /*channel-more*
|
||||
|
||||
+30
-22
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Nov 17
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,22 +35,7 @@ there will not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Test_help_complete sometimes fails on MS-Windows:
|
||||
function RunTheTest[9]..Test_help_complete line 22: Expected ['h test-char@ab',
|
||||
'h test-char@en', 'h test-col@ab', 'h test-col@en'] but got ['h test-char@en', '
|
||||
h test-char@en\t', 'h test-col@ab', 'h test-col@en']
|
||||
Appears to be related to calling feedkeys() with exactly 8 characters.
|
||||
|
||||
Patch for GTK3: Kazunobu Kuriyama, 14 Nov.
|
||||
|
||||
Patch for fix breakindent bug (Christian, Nov 15)
|
||||
|
||||
+channel:
|
||||
- Skip checking if job ended if there aren't any. (ichizok, 2016 Nov 7, #1196)
|
||||
- problem with channel callback getting job, while the job was already
|
||||
deleted. #1242. Fix in #1245 (ichizok), but is that correct?
|
||||
Perhaps just replace job_still_alive() with job_still_useful()?
|
||||
That's not sufficient.
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Add 'cwd' argument to start_job(): directory to change to in the child.
|
||||
check for valid directory before forking.
|
||||
@@ -115,25 +100,26 @@ Regexp problems:
|
||||
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
|
||||
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
|
||||
|
||||
Patch to support nested namespace syntax. (Pauli, 2016 Oct 30, #1214)
|
||||
|
||||
Patch to fix popup menu positioning. (Hirohito Higashi, 2016 Nov 7, #1241)
|
||||
|
||||
Patch to make help tag jumps keep language. (Tatsuki, #1249)
|
||||
Test by Hirohito Higashi.
|
||||
'] mark invalid after undoing insert "hello".
|
||||
|
||||
Make html indent file use javascript indent, now that it's not just cindent.
|
||||
#1220
|
||||
|
||||
Use __sun instead of sun define check. #1296
|
||||
|
||||
Patch to use buffer id for system() and systemlist() (LemonBoy, 2016 Nov 7,
|
||||
#1240)
|
||||
|
||||
When using symbolic links, a package path will not be inserted at the right
|
||||
position in 'runtimepath'. (Dugan Chen, 2016 Nov 18)
|
||||
|
||||
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
What if there is an invalid character?
|
||||
|
||||
Bug: ":earlier 100d" doesn't work after using undo file.
|
||||
(Pavol Juhas, 2016 Nov 15, #1254)
|
||||
Fix by Christian, but lacks a test.
|
||||
Test by Pavol Juhas, Nov 22.
|
||||
|
||||
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
|
||||
Make dict_add give a duplicate key error.
|
||||
@@ -162,6 +148,9 @@ Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
Patch to fix that empty first tab is not in session.
|
||||
(Hirohito Higashi, 2016 Nov 25, #1282)
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
@@ -187,6 +176,11 @@ Is there another solution?
|
||||
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
|
||||
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
|
||||
|
||||
Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
(Ozaki Kiichi, 2016 Nov 25)
|
||||
|
||||
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
E.g. deepcopy(test_null_list())
|
||||
|
||||
@@ -195,6 +189,13 @@ Patch to make it possible to extend a list with itself.
|
||||
|
||||
Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
|
||||
|
||||
Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
|
||||
|
||||
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
|
||||
|
||||
On Windows buffer completion sees backslash as escape char instead of path
|
||||
separator. (Toffanim, 2016 Nov 24, #1274)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
|
||||
@@ -272,6 +273,9 @@ Lakshmanan, 2016 Aug 25)
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Bogus characters inserted when triggering indent while changing test.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
|
||||
Also for ":@.".
|
||||
|
||||
@@ -280,6 +284,9 @@ Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
Have a way to get the call stack, in a function and from an exception.
|
||||
#1125
|
||||
|
||||
Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto,
|
||||
2016 Nov 21, #1266)
|
||||
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
@@ -1306,6 +1313,7 @@ With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
|
||||
Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10)
|
||||
Alternative from Christian Brabandt. (2010 Sep 19)
|
||||
New one from Yasuhiro Matsumoto, #1277.
|
||||
|
||||
Messages in message.txt are highlighted as examples.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2016 Nov 29
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -930,6 +930,7 @@ Testing: *test-functions*
|
||||
test_null_string() return a null String
|
||||
|
||||
Inter-process communication: *channel-functions*
|
||||
ch_canread() check if there is something to read
|
||||
ch_open() open a channel
|
||||
ch_close() close a channel
|
||||
ch_close_in() close the in part of a channel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.0. Last change: 2016 Oct 21
|
||||
*windows.txt* For Vim version 8.0. Last change: 2016 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -696,6 +696,8 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
- If the file is not open in a window edit the file in the
|
||||
current window. If the current buffer can't be |abandon|ed,
|
||||
the window is split first.
|
||||
- Windows that are not in the argument list or are not full
|
||||
width will be closed if possible.
|
||||
The |argument-list| is set, like with the |:next| command.
|
||||
The purpose of this command is that it can be used from a
|
||||
program that wants Vim to edit another file, e.g., a debugger.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Nov 17
|
||||
" Last Change: 2016 Nov 18
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -363,23 +363,23 @@ syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
endif
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
else
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
endif
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
endif
|
||||
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match cIncluded display contained "<[^>]*>"
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>117</string>
|
||||
<string>118</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -233,6 +233,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
[NSNumber numberWithBool:NO], MMSuppressTerminationAlertKey,
|
||||
[NSNumber numberWithBool:YES], MMNativeFullScreenKey,
|
||||
[NSNumber numberWithDouble:0.25], MMFullScreenFadeTimeKey,
|
||||
[NSNumber numberWithBool:NO], MMUseCGLayerAlwaysKey,
|
||||
nil];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
BOOL cgLayerEnabled;
|
||||
CGLayerRef cgLayer;
|
||||
CGContextRef cgLayerContext;
|
||||
NSLock *cgLayerLock;
|
||||
|
||||
// These are used in MMCoreTextView+ToolTip.m
|
||||
id trackingRectOwner_; // (not retained)
|
||||
|
||||
+62
-19
@@ -132,6 +132,10 @@ defaultAdvanceForFont(NSFont *font)
|
||||
if (!(self = [super initWithFrame:frame]))
|
||||
return nil;
|
||||
|
||||
cgLayerEnabled = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMUseCGLayerAlwaysKey];
|
||||
cgLayerLock = [NSLock new];
|
||||
|
||||
// NOTE! It does not matter which font is set here, Vim will set its
|
||||
// own font on startup anyway. Just set some bogus values.
|
||||
font = [[NSFont userFixedPitchFontOfSize:0] retain];
|
||||
@@ -586,18 +590,12 @@ defaultAdvanceForFont(NSFont *font)
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
[context setShouldAntialias:antialias];
|
||||
|
||||
id data;
|
||||
NSEnumerator *e = [drawData objectEnumerator];
|
||||
while ((data = [e nextObject]))
|
||||
[self batchDrawData:data];
|
||||
|
||||
[drawData removeAllObjects];
|
||||
|
||||
if (cgLayerEnabled) {
|
||||
if (cgLayerEnabled && drawData.count == 0) {
|
||||
// during a live resize, we will have around a stale layer until the
|
||||
// refresh messages travel back from the vim process. We push the old
|
||||
// layer in at an offset to get rid of jitter due to lines changing
|
||||
// position.
|
||||
[cgLayerLock lock];
|
||||
CGLayerRef l = [self getCGLayer];
|
||||
CGSize cgLayerSize = CGLayerGetSize(l);
|
||||
CGSize frameSize = [self frame].size;
|
||||
@@ -608,22 +606,45 @@ defaultAdvanceForFont(NSFont *font)
|
||||
cgLayerSize.height);
|
||||
|
||||
CGContextRef cgContext = [context graphicsPort];
|
||||
CGContextSaveGState(cgContext);
|
||||
CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
|
||||
CGContextDrawLayerInRect(cgContext, drawRect, l);
|
||||
CGContextRestoreGState(cgContext);
|
||||
|
||||
const NSRect *rects;
|
||||
long count;
|
||||
[self getRectsBeingDrawn:&rects count:&count];
|
||||
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
CGContextSaveGState(cgContext);
|
||||
CGContextClipToRect(cgContext, rects[i]);
|
||||
CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
|
||||
CGContextDrawLayerInRect(cgContext, drawRect, l);
|
||||
CGContextRestoreGState(cgContext);
|
||||
}
|
||||
[cgLayerLock unlock];
|
||||
} else {
|
||||
id data;
|
||||
NSEnumerator *e = [drawData objectEnumerator];
|
||||
while ((data = [e nextObject]))
|
||||
[self batchDrawData:data];
|
||||
|
||||
[drawData removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)performBatchDrawWithData:(NSData *)data
|
||||
{
|
||||
[drawData addObject:data];
|
||||
[self setNeedsDisplay:YES];
|
||||
if (cgLayerEnabled && drawData.count == 0 && [self getCGContext]) {
|
||||
[cgLayerLock lock];
|
||||
[self batchDrawData:data];
|
||||
[cgLayerLock unlock];
|
||||
} else {
|
||||
[drawData addObject:data];
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
// NOTE: During resizing, Cocoa only sends draw messages before Vim's rows
|
||||
// and columns are changed (due to ipc delays). Force a redraw here.
|
||||
if ([self inLiveResize])
|
||||
[self display];
|
||||
// NOTE: During resizing, Cocoa only sends draw messages before Vim's rows
|
||||
// and columns are changed (due to ipc delays). Force a redraw here.
|
||||
if ([self inLiveResize])
|
||||
[self display];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled
|
||||
@@ -646,11 +667,12 @@ defaultAdvanceForFont(NSFont *font)
|
||||
- (CGLayerRef)getCGLayer
|
||||
{
|
||||
NSParameterAssert(cgLayerEnabled);
|
||||
if (!cgLayer) {
|
||||
if (!cgLayer && [self lockFocusIfCanDraw]) {
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
NSRect frame = [self frame];
|
||||
cgLayer = CGLayerCreateWithContext(
|
||||
[context graphicsPort], frame.size, NULL);
|
||||
[self unlockFocus];
|
||||
}
|
||||
return cgLayer;
|
||||
}
|
||||
@@ -666,6 +688,18 @@ defaultAdvanceForFont(NSFont *font)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setNeedsDisplayCGLayerInRect:(CGRect)rect
|
||||
{
|
||||
if (cgLayerEnabled)
|
||||
[self setNeedsDisplayInRect:rect];
|
||||
}
|
||||
|
||||
- (void)setNeedsDisplayCGLayer:(BOOL)flag
|
||||
{
|
||||
if (cgLayerEnabled)
|
||||
[self setNeedsDisplay:flag];
|
||||
}
|
||||
|
||||
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size
|
||||
{
|
||||
@@ -982,6 +1016,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
}
|
||||
[self setNeedsDisplayCGLayerInRect:r];
|
||||
} else if (DrawStringDrawType == type) {
|
||||
int bg = *((int*)bytes); bytes += sizeof(int);
|
||||
int fg = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -1478,6 +1513,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
if (thinStrokes)
|
||||
CGContextSetFontSmoothingStyle(context, originalFontSmoothingStyle);
|
||||
CGContextRestoreGState(context);
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:clipRect];
|
||||
}
|
||||
|
||||
- (void)scrollRect:(NSRect)rect lineCount:(int)count
|
||||
@@ -1495,6 +1532,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextDrawLayerAtPoint(
|
||||
context, CGPointMake(0, -yOffset), [self getCGLayer]);
|
||||
CGContextRestoreGState(context);
|
||||
[self setNeedsDisplayCGLayerInRect:clipRect];
|
||||
} else {
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
@@ -1549,6 +1587,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeNormal);
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
}
|
||||
|
||||
- (void)clearAll
|
||||
@@ -1565,6 +1604,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextSetRGBFillColor(context, r, g, b, a);
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeNormal);
|
||||
|
||||
[self setNeedsDisplayCGLayer:YES];
|
||||
}
|
||||
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
@@ -1612,6 +1653,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
}
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
@@ -1628,6 +1670,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
numColumns:ncols];
|
||||
CGContextFillRect(cgctx, *(CGRect*)&rect);
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
CGContextRestoreGState(cgctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ extern NSString *MMSuppressTerminationAlertKey;
|
||||
extern NSString *MMNativeFullScreenKey;
|
||||
extern NSString *MMUseMouseTimeKey;
|
||||
extern NSString *MMFullScreenFadeTimeKey;
|
||||
extern NSString *MMUseCGLayerAlwaysKey;
|
||||
|
||||
|
||||
// Enum for MMUntitledWindowKey
|
||||
|
||||
@@ -48,6 +48,7 @@ NSString *MMSuppressTerminationAlertKey = @"MMSuppressTerminationAlert";
|
||||
NSString *MMNativeFullScreenKey = @"MMNativeFullScreen";
|
||||
NSString *MMUseMouseTimeKey = @"MMUseMouseTime";
|
||||
NSString *MMFullScreenFadeTimeKey = @"MMFullScreenFadeTime";
|
||||
NSString *MMUseCGLayerAlwaysKey = @"MMUseCGLayerAlways";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -81,6 +81,13 @@ ifndef STATIC_STDCPLUS
|
||||
STATIC_STDCPLUS=no
|
||||
endif
|
||||
|
||||
|
||||
# Link against the shared version of libwinpthread by default. Set
|
||||
# STATIC_WINPTHREAD to "yes" to link against static version instead.
|
||||
ifndef STATIC_WINPTHREAD
|
||||
STATIC_WINPTHREAD=$(STATIC_STDCPLUS)
|
||||
endif
|
||||
|
||||
# If the user doesn't want gettext, undefine it.
|
||||
ifeq (no, $(GETTEXT))
|
||||
GETTEXT=
|
||||
@@ -817,6 +824,10 @@ LIB += -lstdc++
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (yes, $(STATIC_WINPTHREAD))
|
||||
LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
|
||||
endif
|
||||
|
||||
all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
|
||||
|
||||
vimrun.exe: vimrun.c
|
||||
|
||||
+23
-6
@@ -1701,21 +1701,30 @@ OBJ = $(OBJ_COMMON) \
|
||||
objects/memfile.o \
|
||||
objects/message.o
|
||||
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) \
|
||||
OBJ_JSON_TEST = \
|
||||
objects/memfile.o \
|
||||
objects/message.o \
|
||||
objects/json_test.o
|
||||
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST)
|
||||
|
||||
OBJ_MEMFILE_TEST = \
|
||||
objects/json.o \
|
||||
objects/message.o \
|
||||
objects/memfile_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MEMFILE_TEST)
|
||||
|
||||
OBJ_MESSAGE_TEST = \
|
||||
objects/json.o \
|
||||
objects/memfile.o \
|
||||
objects/message_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST)
|
||||
|
||||
ALL_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST) $(OBJ_MEMFILE_TEST) $(OBJ_MESSAGE_TEST)
|
||||
|
||||
|
||||
PRO_AUTO = \
|
||||
arabic.pro \
|
||||
blowfish.pro \
|
||||
@@ -2069,7 +2078,7 @@ test1 \
|
||||
test60 test64 test65 test66 test67 test68 test69 \
|
||||
test70 test72 test73 test74 test75 test77 test78 test79 \
|
||||
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
||||
test90 test91 test94 test95 test97 test98 test99 \
|
||||
test100 test101 test103 test104 test107 test108:
|
||||
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
@@ -2135,6 +2144,8 @@ test_arglist \
|
||||
test_matchadd_conceal_utf8 \
|
||||
test_menu \
|
||||
test_messages \
|
||||
test_mksession \
|
||||
test_mksession_utf8 \
|
||||
test_nested_function \
|
||||
test_netbeans \
|
||||
test_normal \
|
||||
@@ -2868,8 +2879,14 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
|
||||
# commands understand putting object files in another directory, it must be
|
||||
# specified for each file separately.
|
||||
|
||||
objects:
|
||||
mkdir objects
|
||||
objects objects/.dirstamp:
|
||||
mkdir -p objects
|
||||
touch objects/.dirstamp
|
||||
|
||||
# All object files depend on the objects directory, so that parallel make
|
||||
# works. Can't depend on the directory itself, its timestamp changes all the
|
||||
# time.
|
||||
$(ALL_OBJ): objects/.dirstamp
|
||||
|
||||
objects/MMBackend.o: MacVim/MMBackend.m
|
||||
$(CCC) -fobjc-exceptions -o $@ MacVim/MMBackend.m
|
||||
|
||||
+2
-2
@@ -4868,8 +4868,8 @@ do_arg_all(
|
||||
wpnext = wp->w_next;
|
||||
buf = wp->w_buffer;
|
||||
if (buf->b_ffname == NULL
|
||||
|| (!keep_tabs && buf->b_nwindows > 1)
|
||||
|| wp->w_width != Columns)
|
||||
|| (!keep_tabs && (buf->b_nwindows > 1
|
||||
|| wp->w_width != Columns)))
|
||||
i = opened_len;
|
||||
else
|
||||
{
|
||||
|
||||
+108
-15
@@ -1216,6 +1216,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
if (opt->jo_set & JO_CLOSE_CALLBACK)
|
||||
set_callback(&channel->ch_close_cb, &channel->ch_close_partial,
|
||||
opt->jo_close_cb, opt->jo_close_partial);
|
||||
channel->ch_drop_never = opt->jo_drop_never;
|
||||
|
||||
if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER)
|
||||
{
|
||||
@@ -1939,6 +1940,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
|
||||
clear_tv(&listtv);
|
||||
else
|
||||
{
|
||||
item->jq_no_callback = FALSE;
|
||||
item->jq_value = alloc_tv();
|
||||
if (item->jq_value == NULL)
|
||||
{
|
||||
@@ -2071,11 +2073,17 @@ remove_json_node(jsonq_T *head, jsonq_T *node)
|
||||
* When "id" is positive it must match the first number in the list.
|
||||
* When "id" is zero or negative jut get the first message. But not the one
|
||||
* with id ch_block_id.
|
||||
* When "without_callback" is TRUE also get messages that were pushed back.
|
||||
* Return OK when found and return the value in "rettv".
|
||||
* Return FAIL otherwise.
|
||||
*/
|
||||
static int
|
||||
channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
channel_get_json(
|
||||
channel_T *channel,
|
||||
ch_part_T part,
|
||||
int id,
|
||||
int without_callback,
|
||||
typval_T **rettv)
|
||||
{
|
||||
jsonq_T *head = &channel->ch_part[part].ch_json_head;
|
||||
jsonq_T *item = head->jq_next;
|
||||
@@ -2085,10 +2093,11 @@ channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
list_T *l = item->jq_value->vval.v_list;
|
||||
typval_T *tv = &l->lv_first->li_tv;
|
||||
|
||||
if ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
|
||||
if ((without_callback || !item->jq_no_callback)
|
||||
&& ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
|
||||
|| (id <= 0 && (tv->v_type != VAR_NUMBER
|
||||
|| tv->vval.v_number == 0
|
||||
|| tv->vval.v_number != channel->ch_part[part].ch_block_id)))
|
||||
|| tv->vval.v_number != channel->ch_part[part].ch_block_id))))
|
||||
{
|
||||
*rettv = item->jq_value;
|
||||
if (tv->v_type == VAR_NUMBER)
|
||||
@@ -2101,6 +2110,65 @@ channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Put back "rettv" into the JSON queue, there was no callback for it.
|
||||
* Takes over the values in "rettv".
|
||||
*/
|
||||
static void
|
||||
channel_push_json(channel_T *channel, ch_part_T part, typval_T *rettv)
|
||||
{
|
||||
jsonq_T *head = &channel->ch_part[part].ch_json_head;
|
||||
jsonq_T *item = head->jq_next;
|
||||
jsonq_T *newitem;
|
||||
|
||||
if (head->jq_prev != NULL && head->jq_prev->jq_no_callback)
|
||||
/* last item was pushed back, append to the end */
|
||||
item = NULL;
|
||||
else while (item != NULL && item->jq_no_callback)
|
||||
/* append after the last item that was pushed back */
|
||||
item = item->jq_next;
|
||||
|
||||
newitem = (jsonq_T *)alloc((unsigned)sizeof(jsonq_T));
|
||||
if (newitem == NULL)
|
||||
clear_tv(rettv);
|
||||
else
|
||||
{
|
||||
newitem->jq_value = alloc_tv();
|
||||
if (newitem->jq_value == NULL)
|
||||
{
|
||||
vim_free(newitem);
|
||||
clear_tv(rettv);
|
||||
}
|
||||
else
|
||||
{
|
||||
newitem->jq_no_callback = FALSE;
|
||||
*newitem->jq_value = *rettv;
|
||||
if (item == NULL)
|
||||
{
|
||||
/* append to the end */
|
||||
newitem->jq_prev = head->jq_prev;
|
||||
head->jq_prev = newitem;
|
||||
newitem->jq_next = NULL;
|
||||
if (newitem->jq_prev == NULL)
|
||||
head->jq_next = newitem;
|
||||
else
|
||||
newitem->jq_prev->jq_next = newitem;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* append after "item" */
|
||||
newitem->jq_prev = item;
|
||||
newitem->jq_next = item->jq_next;
|
||||
item->jq_next = newitem;
|
||||
if (newitem->jq_next == NULL)
|
||||
head->jq_prev = newitem;
|
||||
else
|
||||
newitem->jq_next->jq_prev = newitem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define CH_JSON_MAX_ARGS 4
|
||||
|
||||
/*
|
||||
@@ -2431,11 +2499,11 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
int argc = 0;
|
||||
|
||||
/* Get any json message in the queue. */
|
||||
if (channel_get_json(channel, part, -1, &listtv) == FAIL)
|
||||
if (channel_get_json(channel, part, -1, FALSE, &listtv) == FAIL)
|
||||
{
|
||||
/* Parse readahead, return when there is still no message. */
|
||||
channel_parse_json(channel, part);
|
||||
if (channel_get_json(channel, part, -1, &listtv) == FAIL)
|
||||
if (channel_get_json(channel, part, -1, FALSE, &listtv) == FAIL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2475,7 +2543,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
/* If there is a close callback it may use ch_read() to get the
|
||||
* messages. */
|
||||
if (channel->ch_close_cb == NULL)
|
||||
if (channel->ch_close_cb == NULL && !channel->ch_drop_never)
|
||||
drop_messages(channel, part);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2552,7 +2620,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
int done = FALSE;
|
||||
|
||||
/* invoke the one-time callback with the matching nr */
|
||||
/* JSON or JS mode: invoke the one-time callback with the matching nr */
|
||||
for (cbitem = cbhead->cq_next; cbitem != NULL; cbitem = cbitem->cq_next)
|
||||
if (cbitem->cq_seq_nr == seq_nr)
|
||||
{
|
||||
@@ -2561,7 +2629,17 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
break;
|
||||
}
|
||||
if (!done)
|
||||
ch_logn(channel, "Dropping message %d without callback", seq_nr);
|
||||
{
|
||||
if (channel->ch_drop_never)
|
||||
{
|
||||
/* message must be read with ch_read() */
|
||||
channel_push_json(channel, part, listtv);
|
||||
listtv = NULL;
|
||||
}
|
||||
else
|
||||
ch_logn(channel, "Dropping message %d without callback",
|
||||
seq_nr);
|
||||
}
|
||||
}
|
||||
else if (callback != NULL || buffer != NULL)
|
||||
{
|
||||
@@ -2588,7 +2666,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
}
|
||||
}
|
||||
else
|
||||
ch_log(channel, "Dropping message");
|
||||
ch_logn(channel, "Dropping message %d", seq_nr);
|
||||
|
||||
if (listtv != NULL)
|
||||
free_tv(listtv);
|
||||
@@ -2813,9 +2891,10 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
redraw_after_callback();
|
||||
}
|
||||
|
||||
/* any remaining messages are useless now */
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
drop_messages(channel, part);
|
||||
if (!channel->ch_drop_never)
|
||||
/* any remaining messages are useless now */
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
drop_messages(channel, part);
|
||||
}
|
||||
|
||||
channel->ch_nb_close_cb = NULL;
|
||||
@@ -3112,9 +3191,9 @@ ch_close_part_on_error(
|
||||
channel_close_now(channel_T *channel)
|
||||
{
|
||||
ch_log(channel, "Closing channel because all readable fds are closed");
|
||||
channel_close(channel, TRUE);
|
||||
if (channel->ch_nb_close_cb != NULL)
|
||||
(*channel->ch_nb_close_cb)();
|
||||
channel_close(channel, TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3268,7 +3347,7 @@ channel_read_block(channel_T *channel, ch_part_T part, int timeout)
|
||||
* When "id" is -1 accept any message;
|
||||
* Blocks until the message is received or the timeout is reached.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
channel_read_json_block(
|
||||
channel_T *channel,
|
||||
ch_part_T part,
|
||||
@@ -3289,7 +3368,7 @@ channel_read_json_block(
|
||||
more = channel_parse_json(channel, part);
|
||||
|
||||
/* search for message "id" */
|
||||
if (channel_get_json(channel, part, id, rettv) == OK)
|
||||
if (channel_get_json(channel, part, id, TRUE, rettv) == OK)
|
||||
{
|
||||
chanpart->ch_block_id = 0;
|
||||
return OK;
|
||||
@@ -4315,6 +4394,20 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported)
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "drop") == 0)
|
||||
{
|
||||
int never = FALSE;
|
||||
val = get_tv_string(item);
|
||||
|
||||
if (STRCMP(val, "never") == 0)
|
||||
never = TRUE;
|
||||
else if (STRCMP(val, "auto") != 0)
|
||||
{
|
||||
EMSG2(_(e_invarg2), "drop");
|
||||
return FAIL;
|
||||
}
|
||||
opt->jo_drop_never = never;
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "exit_cb") == 0)
|
||||
{
|
||||
if (!(supported & JO_EXIT_CB))
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
#undef BAD_GETCWD
|
||||
|
||||
/* Define if you the function: */
|
||||
#undef HAVE_BCMP
|
||||
#undef HAVE_FCHDIR
|
||||
#undef HAVE_FCHOWN
|
||||
#undef HAVE_FSEEKO
|
||||
@@ -170,7 +169,6 @@
|
||||
#undef HAVE_ICONV
|
||||
#undef HAVE_NL_LANGINFO_CODESET
|
||||
#undef HAVE_LSTAT
|
||||
#undef HAVE_MEMCMP
|
||||
#undef HAVE_MEMSET
|
||||
#undef HAVE_MKDTEMP
|
||||
#undef HAVE_NANOSLEEP
|
||||
|
||||
+2
-2
@@ -3673,8 +3673,8 @@ fi
|
||||
|
||||
dnl Check for functions in one big call, to reduce the size of configure.
|
||||
dnl Can only be used for functions that do not require any include.
|
||||
AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
AC_CHECK_FUNCS(fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
|
||||
+2
-2
@@ -471,7 +471,7 @@ static struct fst
|
||||
{"assert_exception", 1, 2, f_assert_exception},
|
||||
{"assert_fails", 1, 2, f_assert_fails},
|
||||
{"assert_false", 1, 2, f_assert_false},
|
||||
{"assert_inrange", 2, 3, f_assert_inrange},
|
||||
{"assert_inrange", 3, 4, f_assert_inrange},
|
||||
{"assert_match", 2, 3, f_assert_match},
|
||||
{"assert_notequal", 2, 3, f_assert_notequal},
|
||||
{"assert_notmatch", 2, 3, f_assert_notmatch},
|
||||
@@ -1786,7 +1786,7 @@ f_ceil(typval_T *argvars, typval_T *rettv)
|
||||
static void
|
||||
f_ch_canread(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], TRUE, TRUE, 0);
|
||||
channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
|
||||
rettv->vval.v_number = 0;
|
||||
if (channel != NULL)
|
||||
|
||||
+39
-27
@@ -2297,19 +2297,24 @@ GetTextWidthEnc(HDC hdc, char_u *str, int len)
|
||||
# define GetTextWidthEnc(h, s, l) GetTextWidth((h), (s), (l))
|
||||
#endif
|
||||
|
||||
static void get_work_area(RECT *spi_rect);
|
||||
|
||||
/*
|
||||
* A quick little routine that will center one window over another, handy for
|
||||
* dialog boxes. Taken from the Win32SDK samples.
|
||||
* dialog boxes. Taken from the Win32SDK samples and modified for multiple
|
||||
* monitors.
|
||||
*/
|
||||
static BOOL
|
||||
CenterWindow(
|
||||
HWND hwndChild,
|
||||
HWND hwndParent)
|
||||
{
|
||||
RECT rChild, rParent;
|
||||
int wChild, hChild, wParent, hParent;
|
||||
int wScreen, hScreen, xNew, yNew;
|
||||
HDC hdc;
|
||||
HMONITOR mon;
|
||||
MONITORINFO moninfo;
|
||||
RECT rChild, rParent, rScreen;
|
||||
int wChild, hChild, wParent, hParent;
|
||||
int xNew, yNew;
|
||||
HDC hdc;
|
||||
|
||||
GetWindowRect(hwndChild, &rChild);
|
||||
wChild = rChild.right - rChild.left;
|
||||
@@ -2317,32 +2322,39 @@ CenterWindow(
|
||||
|
||||
/* If Vim is minimized put the window in the middle of the screen. */
|
||||
if (hwndParent == NULL || IsMinimized(hwndParent))
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rParent, 0);
|
||||
get_work_area(&rParent);
|
||||
else
|
||||
GetWindowRect(hwndParent, &rParent);
|
||||
wParent = rParent.right - rParent.left;
|
||||
hParent = rParent.bottom - rParent.top;
|
||||
|
||||
hdc = GetDC(hwndChild);
|
||||
wScreen = GetDeviceCaps (hdc, HORZRES);
|
||||
hScreen = GetDeviceCaps (hdc, VERTRES);
|
||||
ReleaseDC(hwndChild, hdc);
|
||||
|
||||
xNew = rParent.left + ((wParent - wChild) /2);
|
||||
if (xNew < 0)
|
||||
moninfo.cbSize = sizeof(MONITORINFO);
|
||||
mon = MonitorFromWindow(hwndChild, MONITOR_DEFAULTTOPRIMARY);
|
||||
if (mon != NULL && GetMonitorInfo(mon, &moninfo))
|
||||
{
|
||||
xNew = 0;
|
||||
rScreen = moninfo.rcWork;
|
||||
}
|
||||
else if ((xNew+wChild) > wScreen)
|
||||
else
|
||||
{
|
||||
xNew = wScreen - wChild;
|
||||
hdc = GetDC(hwndChild);
|
||||
rScreen.left = 0;
|
||||
rScreen.top = 0;
|
||||
rScreen.right = GetDeviceCaps(hdc, HORZRES);
|
||||
rScreen.bottom = GetDeviceCaps(hdc, VERTRES);
|
||||
ReleaseDC(hwndChild, hdc);
|
||||
}
|
||||
|
||||
yNew = rParent.top + ((hParent - hChild) /2);
|
||||
if (yNew < 0)
|
||||
yNew = 0;
|
||||
else if ((yNew+hChild) > hScreen)
|
||||
yNew = hScreen - hChild;
|
||||
xNew = rParent.left + ((wParent - wChild) / 2);
|
||||
if (xNew < rScreen.left)
|
||||
xNew = rScreen.left;
|
||||
else if ((xNew + wChild) > rScreen.right)
|
||||
xNew = rScreen.right - wChild;
|
||||
|
||||
yNew = rParent.top + ((hParent - hChild) / 2);
|
||||
if (yNew < rScreen.top)
|
||||
yNew = rScreen.top;
|
||||
else if ((yNew + hChild) > rScreen.bottom)
|
||||
yNew = rScreen.bottom - hChild;
|
||||
|
||||
return SetWindowPos(hwndChild, NULL, xNew, yNew, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOZORDER);
|
||||
@@ -3539,12 +3551,12 @@ gui_mch_browseW(
|
||||
filterp = convert_filterW(filter);
|
||||
|
||||
vim_memset(&fileStruct, 0, sizeof(OPENFILENAMEW));
|
||||
#ifdef OPENFILENAME_SIZE_VERSION_400W
|
||||
# ifdef OPENFILENAME_SIZE_VERSION_400W
|
||||
/* be compatible with Windows NT 4.0 */
|
||||
fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W;
|
||||
#else
|
||||
# else
|
||||
fileStruct.lStructSize = sizeof(fileStruct);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
if (title != NULL)
|
||||
titlep = enc_to_utf16(title, NULL);
|
||||
@@ -3581,10 +3593,10 @@ gui_mch_browseW(
|
||||
* Don't use OFN_OVERWRITEPROMPT, Vim has its own ":confirm" dialog.
|
||||
*/
|
||||
fileStruct.Flags = (OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY);
|
||||
#ifdef FEAT_SHORTCUT
|
||||
# ifdef FEAT_SHORTCUT
|
||||
if (curbuf->b_p_bin)
|
||||
fileStruct.Flags |= OFN_NODEREFERENCELINKS;
|
||||
#endif
|
||||
# endif
|
||||
if (saving)
|
||||
{
|
||||
if (!GetSaveFileNameW(&fileStruct))
|
||||
@@ -5559,7 +5571,7 @@ get_work_area(RECT *spi_rect)
|
||||
MONITORINFO moninfo;
|
||||
|
||||
/* work out which monitor the window is on, and get *it's* work area */
|
||||
mon = MonitorFromWindow(s_hwnd, 1 /*MONITOR_DEFAULTTOPRIMARY*/);
|
||||
mon = MonitorFromWindow(s_hwnd, MONITOR_DEFAULTTOPRIMARY);
|
||||
if (mon != NULL)
|
||||
{
|
||||
moninfo.cbSize = sizeof(MONITORINFO);
|
||||
|
||||
+1
-1
@@ -5807,7 +5807,7 @@ static char e_xim[] = N_("E285: Failed to create input context");
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_GUI_X11) || defined(PROTO)
|
||||
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
|
||||
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(SUN_SYSTEM)
|
||||
# define USE_X11R6_XIM
|
||||
# endif
|
||||
|
||||
|
||||
+24
-1
@@ -42,6 +42,9 @@ static int confirm_msg_used = FALSE; /* displaying confirm_msg */
|
||||
static char_u *confirm_msg = NULL; /* ":confirm" message */
|
||||
static char_u *confirm_msg_tail; /* tail of confirm_msg */
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
static int emsg_to_channel_log = FALSE;
|
||||
#endif
|
||||
|
||||
struct msg_hist
|
||||
{
|
||||
@@ -166,6 +169,14 @@ msg_attr_keep(
|
||||
&& STRCMP(s, last_msg_hist->msg)))
|
||||
add_msg_hist(s, -1, attr);
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if (emsg_to_channel_log)
|
||||
{
|
||||
/* Write message in the channel log. */
|
||||
ch_logs(NULL, "ERROR: %s", (char *)s);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* When displaying keep_msg, don't let msg_start() free it, caller must do
|
||||
* that. */
|
||||
if (s == keep_msg)
|
||||
@@ -556,6 +567,7 @@ emsg(char_u *s)
|
||||
{
|
||||
int attr;
|
||||
char_u *p;
|
||||
int r;
|
||||
#ifdef FEAT_EVAL
|
||||
int ignore = FALSE;
|
||||
int severe;
|
||||
@@ -624,6 +636,9 @@ emsg(char_u *s)
|
||||
}
|
||||
redir_write(s, -1);
|
||||
}
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
ch_logs(NULL, "ERROR: %s", (char *)s);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -650,6 +665,9 @@ emsg(char_u *s)
|
||||
* and a redraw is expected because
|
||||
* msg_scrolled is non-zero */
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
emsg_to_channel_log = TRUE;
|
||||
#endif
|
||||
/*
|
||||
* Display name and line number for the source of the error.
|
||||
*/
|
||||
@@ -659,7 +677,12 @@ emsg(char_u *s)
|
||||
* Display the error message itself.
|
||||
*/
|
||||
msg_nowait = FALSE; /* wait for this msg */
|
||||
return msg_attr(s, attr);
|
||||
r = msg_attr(s, attr);
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
emsg_to_channel_log = FALSE;
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+5
-24
@@ -1740,27 +1740,6 @@ vim_memset(void *ptr, int c, size_t size)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VIM_MEMCMP
|
||||
/*
|
||||
* Return zero when "b1" and "b2" are the same for "len" bytes.
|
||||
* Return non-zero otherwise.
|
||||
*/
|
||||
int
|
||||
vim_memcmp(void *b1, void *b2, size_t len)
|
||||
{
|
||||
char_u *p1 = (char_u *)b1, *p2 = (char_u *)b2;
|
||||
|
||||
for ( ; len > 0; --len)
|
||||
{
|
||||
if (*p1 != *p2)
|
||||
return 1;
|
||||
++p1;
|
||||
++p2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* skipped when generating prototypes, the prototype is in vim.h */
|
||||
#ifdef VIM_MEMMOVE
|
||||
/*
|
||||
@@ -6270,7 +6249,8 @@ parse_queued_messages(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ELAPSED_TIMEVAL /* no PROTO here, proto is defined in vim.h */
|
||||
#ifndef PROTO /* proto is defined in vim.h */
|
||||
# ifdef ELAPSED_TIMEVAL
|
||||
/*
|
||||
* Return time in msec since "start_tv".
|
||||
*/
|
||||
@@ -6283,9 +6263,9 @@ elapsed(struct timeval *start_tv)
|
||||
return (now_tv.tv_sec - start_tv->tv_sec) * 1000L
|
||||
+ (now_tv.tv_usec - start_tv->tv_usec) / 1000L;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifdef ELAPSED_TICKCOUNT
|
||||
# ifdef ELAPSED_TICKCOUNT
|
||||
/*
|
||||
* Return time in msec since "start_tick".
|
||||
*/
|
||||
@@ -6296,4 +6276,5 @@ elapsed(DWORD start_tick)
|
||||
|
||||
return (long)now - (long)start_tick;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+8
-5
@@ -441,8 +441,8 @@ struct vimoption
|
||||
|
||||
/* when option changed, what to display: */
|
||||
#define P_RSTAT 0x1000 /* redraw status lines */
|
||||
#define P_RWIN 0x2000 /* redraw current window */
|
||||
#define P_RBUF 0x4000 /* redraw current buffer */
|
||||
#define P_RWIN 0x2000 /* redraw current window and recompute text */
|
||||
#define P_RBUF 0x4000 /* redraw current buffer and recompute text */
|
||||
#define P_RALL 0x6000 /* redraw all windows */
|
||||
#define P_RCLR 0x7000 /* clear and redraw all */
|
||||
|
||||
@@ -463,6 +463,7 @@ struct vimoption
|
||||
#define P_CURSWANT 0x4000000L /* update curswant required; not needed when
|
||||
* there is a redraw flag */
|
||||
#define P_NDNAME 0x8000000L /* only normal dir name chars allowed */
|
||||
#define P_RWINONLY 0x10000000L /* only redraw current window */
|
||||
|
||||
#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
|
||||
|
||||
@@ -979,7 +980,7 @@ static struct vimoption options[] =
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN,
|
||||
{"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
|
||||
#ifdef FEAT_SYN_HL
|
||||
(char_u *)VAR_WIN, PV_CUL,
|
||||
#else
|
||||
@@ -2189,7 +2190,7 @@ static struct vimoption options[] =
|
||||
SCRIPTID_INIT},
|
||||
{"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_py3home, PV_NONE,
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON)
|
||||
@@ -2199,7 +2200,7 @@ static struct vimoption options[] =
|
||||
SCRIPTID_INIT},
|
||||
{"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_pyhome, PV_NONE,
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
|
||||
@@ -9238,6 +9239,8 @@ check_redraw(long_u flags)
|
||||
changed_window_setting();
|
||||
if (flags & P_RBUF)
|
||||
redraw_curbuf_later(NOT_VALID);
|
||||
if (flags & P_RWINONLY)
|
||||
redraw_later(NOT_VALID);
|
||||
if (doclear)
|
||||
redraw_all_later(CLEAR);
|
||||
else if (all)
|
||||
|
||||
+4
-2
@@ -40,7 +40,7 @@
|
||||
# include <dlgs.h>
|
||||
# include <winspool.h>
|
||||
# include <commdlg.h>
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* PROTO */
|
||||
|
||||
@@ -1619,7 +1619,9 @@ mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit)
|
||||
|
||||
if (psettings->n_uncollated_copies == 0)
|
||||
psettings->n_uncollated_copies = 1;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
psettings->n_collated_copies = 1;
|
||||
psettings->n_uncollated_copies = 1;
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
# define signal sigset
|
||||
#endif
|
||||
|
||||
/* sun's sys/ioctl.h redefines symbols from termio world */
|
||||
#if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
|
||||
/* Sun's sys/ioctl.h redefines symbols from termio world */
|
||||
#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
#define HAVE_STRTOL
|
||||
#define HAVE_TGETENT
|
||||
#define HAVE_MEMSET
|
||||
#define HAVE_MEMCMP
|
||||
#define HAVE_STRERROR
|
||||
#define HAVE_FCHOWN
|
||||
#define HAVE_RENAME
|
||||
|
||||
@@ -50,12 +50,7 @@ extern int poll(struct pollfd *, long, int);
|
||||
#ifdef HAVE_MEMSET
|
||||
extern void *memset(void *, int, size_t);
|
||||
#endif
|
||||
#ifdef HAVE_BCMP
|
||||
extern int bcmp(void *, void *, size_t);
|
||||
#endif
|
||||
#ifdef HAVE_MEMCMP
|
||||
extern int memcmp(const void *, const void *, size_t);
|
||||
#endif
|
||||
#ifdef HAVE_STRPBRK
|
||||
extern char *strpbrk(const char *, const char *);
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,6 @@ void channel_close_in(channel_T *channel);
|
||||
void channel_clear(channel_T *channel);
|
||||
void channel_free_all(void);
|
||||
char_u *channel_read_block(channel_T *channel, ch_part_T part, int timeout);
|
||||
int channel_read_json_block(channel_T *channel, ch_part_T part, int timeout_arg, int id, typval_T **rettv);
|
||||
void common_channel_read(typval_T *argvars, typval_T *rettv, int raw);
|
||||
channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
|
||||
void channel_handle_events(void);
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#ifdef sinix
|
||||
#undef buf_T
|
||||
#endif
|
||||
# ifdef sun
|
||||
# ifdef SUN_SYSTEM
|
||||
# include <sys/conf.h>
|
||||
# endif
|
||||
#endif
|
||||
@@ -87,11 +87,11 @@
|
||||
# include <sys/ptem.h>
|
||||
#endif
|
||||
|
||||
#if !defined(sun) && !defined(VMS) && !defined(MACOS)
|
||||
#if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
|
||||
#if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL)
|
||||
# include <sys/ttold.h>
|
||||
#endif
|
||||
|
||||
@@ -166,7 +166,7 @@ SetupSlavePTY(int fd)
|
||||
# endif
|
||||
if (ioctl(fd, I_PUSH, "ldterm") != 0)
|
||||
return -1;
|
||||
# ifdef sun
|
||||
# ifdef SUN_SYSTEM
|
||||
if (ioctl(fd, I_PUSH, "ttcompat") != 0)
|
||||
return -1;
|
||||
# endif
|
||||
@@ -391,7 +391,7 @@ OpenPTY(char **ttyn)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
|
||||
#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
|
||||
/* Hack to ensure that the slave side of the pty is
|
||||
* unused. May not work in anything other than SunOS4.1
|
||||
*/
|
||||
|
||||
+2
-1
@@ -1704,7 +1704,8 @@ searchc(cmdarg_T *cap, int t_cmd)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vim_memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 && stop)
|
||||
if (memcmp(p + col, lastc_bytes, lastc_bytelen) == 0
|
||||
&& stop)
|
||||
break;
|
||||
}
|
||||
stop = TRUE;
|
||||
|
||||
@@ -1474,6 +1474,7 @@ struct jsonq_S
|
||||
typval_T *jq_value;
|
||||
jsonq_T *jq_next;
|
||||
jsonq_T *jq_prev;
|
||||
int jq_no_callback; /* TRUE when no callback was found */
|
||||
};
|
||||
|
||||
struct cbq_S
|
||||
@@ -1600,6 +1601,7 @@ struct channel_S {
|
||||
partial_T *ch_partial;
|
||||
char_u *ch_close_cb; /* call when channel is closed */
|
||||
partial_T *ch_close_partial;
|
||||
int ch_drop_never;
|
||||
|
||||
job_T *ch_job; /* Job that uses this channel; this does not
|
||||
* count as a reference to avoid a circular
|
||||
@@ -1687,6 +1689,7 @@ typedef struct
|
||||
partial_T *jo_close_partial; /* not referenced! */
|
||||
char_u *jo_exit_cb; /* not allocated! */
|
||||
partial_T *jo_exit_partial; /* not referenced! */
|
||||
int jo_drop_never;
|
||||
int jo_waittime;
|
||||
int jo_timeout;
|
||||
int jo_out_timeout;
|
||||
|
||||
@@ -742,7 +742,7 @@ do_tag(
|
||||
/* skip backslash used for escaping a command char or
|
||||
* a backslash */
|
||||
if (*p == '\\' && (*(p + 1) == *tagp.command
|
||||
|| *(p + 1) == '\\'))
|
||||
|| *(p + 1) == '\\'))
|
||||
++p;
|
||||
|
||||
if (*p == TAB)
|
||||
@@ -1356,6 +1356,7 @@ find_tags(
|
||||
char_u *help_lang_find = NULL; /* lang to be found */
|
||||
char_u help_lang[3]; /* lang of current tags file */
|
||||
char_u *saved_pat = NULL; /* copy of pat[] */
|
||||
int is_txt = FALSE; /* flag of file extension */
|
||||
#endif
|
||||
|
||||
pat_T orgpat; /* holds unconverted pattern info */
|
||||
@@ -1388,7 +1389,7 @@ find_tags(
|
||||
*/
|
||||
switch (curbuf->b_tc_flags ? curbuf->b_tc_flags : tc_flags)
|
||||
{
|
||||
case TC_FOLLOWIC: break;
|
||||
case TC_FOLLOWIC: break;
|
||||
case TC_IGNORE: p_ic = TRUE; break;
|
||||
case TC_MATCH: p_ic = FALSE; break;
|
||||
case TC_FOLLOWSCS: p_ic = ignorecase(pat); break;
|
||||
@@ -1476,6 +1477,15 @@ find_tags(
|
||||
* When the tag file is case-fold sorted, it is either one or the other.
|
||||
* Only ignore case when TAG_NOIC not used or 'ignorecase' set.
|
||||
*/
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
/* Set a flag if the file extension is .txt */
|
||||
if ((flags & TAG_KEEP_LANG)
|
||||
&& help_lang_find == NULL
|
||||
&& curbuf->b_fname != NULL
|
||||
&& (i = (int)STRLEN(curbuf->b_fname)) > 4
|
||||
&& STRICMP(curbuf->b_fname + i - 4, ".txt") == 0)
|
||||
is_txt = TRUE;
|
||||
#endif
|
||||
#ifdef FEAT_TAG_BINS
|
||||
orgpat.regmatch.rm_ic = ((p_ic || !noic)
|
||||
&& (findall || orgpat.headlen == 0 || !p_tbs));
|
||||
@@ -1509,14 +1519,19 @@ find_tags(
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
if (curbuf->b_help)
|
||||
{
|
||||
/* Prefer help tags according to 'helplang'. Put the
|
||||
* two-letter language name in help_lang[]. */
|
||||
i = (int)STRLEN(tag_fname);
|
||||
if (i > 3 && tag_fname[i - 3] == '-')
|
||||
STRCPY(help_lang, tag_fname + i - 2);
|
||||
else
|
||||
/* Keep en if the file extension is .txt*/
|
||||
if (is_txt)
|
||||
STRCPY(help_lang, "en");
|
||||
|
||||
else
|
||||
{
|
||||
/* Prefer help tags according to 'helplang'. Put the
|
||||
* two-letter language name in help_lang[]. */
|
||||
i = (int)STRLEN(tag_fname);
|
||||
if (i > 3 && tag_fname[i - 3] == '-')
|
||||
STRCPY(help_lang, tag_fname + i - 2);
|
||||
else
|
||||
STRCPY(help_lang, "en");
|
||||
}
|
||||
/* When searching for a specific language skip tags files
|
||||
* for other languages. */
|
||||
if (help_lang_find != NULL
|
||||
@@ -2400,7 +2415,7 @@ parse_line:
|
||||
mfp2 = ((struct match_found **)
|
||||
(ga_match[mtt].ga_data))[i];
|
||||
if (mfp2->len == mfp->len
|
||||
&& vim_memcmp(mfp2->match, mfp->match,
|
||||
&& memcmp(mfp2->match, mfp->match,
|
||||
(size_t)mfp->len) == 0)
|
||||
break;
|
||||
fast_breakcheck();
|
||||
|
||||
@@ -63,8 +63,6 @@ SCRIPTS_ALL = \
|
||||
test88.out \
|
||||
test90.out \
|
||||
test91.out \
|
||||
test92.out \
|
||||
test93.out \
|
||||
test94.out \
|
||||
test95.out \
|
||||
test98.out \
|
||||
@@ -167,6 +165,8 @@ NEW_TESTS = test_arglist.res \
|
||||
test_man.res \
|
||||
test_marks.res \
|
||||
test_matchadd_conceal.res \
|
||||
test_mksession.res \
|
||||
test_mksession_utf8.res \
|
||||
test_nested_function.res \
|
||||
test_netbeans.res \
|
||||
test_normal.res \
|
||||
|
||||
@@ -92,7 +92,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \
|
||||
test72.out test75.out \
|
||||
test77a.out test78.out test79.out test80.out \
|
||||
test82.out test84.out test88.out test89.out \
|
||||
test90.out test91.out test92.out test93.out test94.out \
|
||||
test90.out test91.out test94.out \
|
||||
test95.out test98.out test99.out \
|
||||
test103.out test104.out \
|
||||
test107.out test108.out\
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
vim: set ft=vim fenc=utf-8:
|
||||
|
||||
Tests if :mksession saves cursor columns correctly in presence of tab and
|
||||
multibyte characters when fileencoding=utf-8.
|
||||
|
||||
STARTTEST
|
||||
:so mbyte.vim
|
||||
:if !has('mksession')
|
||||
: e! test.ok
|
||||
: wq! test.out
|
||||
:endif
|
||||
:set sessionoptions=buffers splitbelow fileencoding=utf-8
|
||||
/^start:
|
||||
:vsplit
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j8|:split
|
||||
j8|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:wincmd l
|
||||
/^start:
|
||||
:set nowrap
|
||||
j16|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j08|3zl:split
|
||||
j08|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
:mksession! test.out
|
||||
:new test.out
|
||||
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
|
||||
:w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
start:
|
||||
no multibyte chAracter
|
||||
one leaDing tab
|
||||
four leadinG spaces
|
||||
two consecutive tabs
|
||||
two tabs in one line
|
||||
one … multibyteCharacter
|
||||
a “b” two multiByte characters
|
||||
“c”1€ three mulTibyte characters
|
||||
@@ -1,26 +0,0 @@
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 08|
|
||||
normal! 08|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
@@ -1,48 +0,0 @@
|
||||
vim: set ft=vim fenc=latin1:
|
||||
|
||||
Tests if :mksession saves cursor columns correctly in presence of tab and
|
||||
multibyte characters when fileencoding=latin1.
|
||||
|
||||
STARTTEST
|
||||
:so mbyte.vim
|
||||
:if !has('mksession')
|
||||
: e! test.ok
|
||||
: wq! test.out
|
||||
:endif
|
||||
:set sessionoptions=buffers splitbelow fileencoding=latin1
|
||||
/^start:
|
||||
:vsplit
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j8|:split
|
||||
j8|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:wincmd l
|
||||
/^start:
|
||||
:set nowrap
|
||||
j16|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j08|3zl:split
|
||||
j08|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
:mksession! test.out
|
||||
:new test.out
|
||||
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
|
||||
:w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
start:
|
||||
no multibyte chAracter
|
||||
one leaDing tab
|
||||
four leadinG spaces
|
||||
two consecutive tabs
|
||||
two tabs in one line
|
||||
one ä multibyteCharacter
|
||||
aä Ä two multiByte characters
|
||||
Aäöü three mulTibyte characters
|
||||
@@ -1,26 +0,0 @@
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 08|
|
||||
normal! 08|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
@@ -117,6 +117,8 @@ func Test_assert_inrange()
|
||||
call assert_inrange(5, 7, 8)
|
||||
call assert_match("Expected range 5 - 7, but got 8", v:errors[0])
|
||||
call remove(v:errors, 0)
|
||||
|
||||
call assert_fails('call assert_inrange(1, 1)', 'E119:')
|
||||
endfunc
|
||||
|
||||
func Test_user_is_happy()
|
||||
|
||||
@@ -127,7 +127,9 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
||||
print("sending: {0}".format(cmd))
|
||||
self.request.sendall(cmd.encode('utf-8'))
|
||||
response = "ok"
|
||||
time.sleep(0.01)
|
||||
# Need to wait for Vim to give up, otherwise it
|
||||
# sometimes fails on OS X.
|
||||
time.sleep(0.2)
|
||||
elif decoded[1] == 'malformed2':
|
||||
cmd = '"unterminated string'
|
||||
print("sending: {0}".format(cmd))
|
||||
|
||||
@@ -26,7 +26,10 @@ func Ch_requestHandler(handle, msg)
|
||||
endfunc
|
||||
|
||||
func Ch_communicate(port)
|
||||
" Avoid dropping messages, since we don't use a callback here.
|
||||
let s:chopt.drop = 'never'
|
||||
let handle = ch_open('localhost:' . a:port, s:chopt)
|
||||
unlet s:chopt.drop
|
||||
if ch_status(handle) == "fail"
|
||||
call assert_false(1, "Can't open channel")
|
||||
return
|
||||
@@ -129,6 +132,9 @@ func Ch_communicate(port)
|
||||
call ch_setoptions(handle, {'mode': 'json'})
|
||||
call assert_fails("call ch_setoptions(handle, {'waittime': 111})", "E475")
|
||||
call ch_setoptions(handle, {'callback': ''})
|
||||
call ch_setoptions(handle, {'drop': 'never'})
|
||||
call ch_setoptions(handle, {'drop': 'auto'})
|
||||
call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", "E475")
|
||||
|
||||
" Send an eval request that works.
|
||||
call assert_equal('ok', ch_evalexpr(handle, 'eval-works'))
|
||||
@@ -249,6 +255,7 @@ endfunc
|
||||
"""""""""
|
||||
|
||||
func Ch_handler(chan, msg)
|
||||
call ch_log('Ch_handler()')
|
||||
unlet g:Ch_reply
|
||||
let g:Ch_reply = a:msg
|
||||
endfunc
|
||||
@@ -272,6 +279,7 @@ func Ch_channel_handler(port)
|
||||
endfunc
|
||||
|
||||
func Test_channel_handler()
|
||||
call ch_logfile('channellog', 'w')
|
||||
call ch_log('Test_channel_handler()')
|
||||
let g:Ch_reply = ""
|
||||
let s:chopt.callback = 'Ch_handler'
|
||||
@@ -437,7 +445,7 @@ func Test_raw_pipe()
|
||||
" Add a dummy close callback to avoid that messages are dropped when calling
|
||||
" ch_canread().
|
||||
let job = job_start(s:python . " test_channel_pipe.py",
|
||||
\ {'mode': 'raw', 'close_cb': {chan -> 0}})
|
||||
\ {'mode': 'raw', 'drop': 'never'})
|
||||
call assert_equal(v:t_job, type(job))
|
||||
call assert_equal("run", job_status(job))
|
||||
|
||||
|
||||
@@ -194,3 +194,26 @@ func Test_expand_star_star()
|
||||
bwipe!
|
||||
call delete('a', 'rf')
|
||||
endfunc
|
||||
|
||||
func Test_paste_in_cmdline()
|
||||
let @a = "def"
|
||||
call feedkeys(":abc \<C-R>a ghi\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"abc def ghi', @:)
|
||||
|
||||
new
|
||||
call setline(1, 'asdf.x /tmp/some verylongword a;b-c*d ')
|
||||
|
||||
call feedkeys(":aaa \<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa asdf bbb', @:)
|
||||
|
||||
call feedkeys("ft:aaa \<C-R>\<C-F> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa /tmp/some bbb', @:)
|
||||
|
||||
set incsearch
|
||||
call feedkeys("fy:aaa veryl\<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa verylongword bbb', @:)
|
||||
|
||||
call feedkeys("f;:aaa \<C-R>\<C-A> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa a;b-c*d bbb', @:)
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
@@ -273,3 +273,18 @@ func Test_gd_string_only()
|
||||
\ ]
|
||||
call XTest_goto_decl('gd', lines, 5, 10)
|
||||
endfunc
|
||||
|
||||
" Check that setting 'cursorline' does not change curswant
|
||||
func Test_cursorline_keep_col()
|
||||
new
|
||||
call setline(1, ['long long long line', 'short line'])
|
||||
normal ggfi
|
||||
let pos = getcurpos()
|
||||
normal j
|
||||
set cursorline
|
||||
normal k
|
||||
call assert_equal(pos, getcurpos())
|
||||
bwipe!
|
||||
set nocursorline
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -141,4 +141,36 @@ func Test_help_complete()
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
func Test_help_respect_current_file_lang()
|
||||
try
|
||||
let list = []
|
||||
call s:doc_config_setup()
|
||||
|
||||
if has('multi_lang')
|
||||
function s:check_help_file_ext(help_keyword, ext)
|
||||
exec 'help ' . a:help_keyword
|
||||
call assert_equal(a:ext, expand('%:e'))
|
||||
call feedkeys("\<C-]>", 'tx')
|
||||
call assert_equal(a:ext, expand('%:e'))
|
||||
pop
|
||||
helpclose
|
||||
endfunc
|
||||
|
||||
set rtp+=Xdir1/doc-ab
|
||||
set rtp+=Xdir1/doc-ja
|
||||
|
||||
set helplang=ab
|
||||
call s:check_help_file_ext('test-char', 'abx')
|
||||
call s:check_help_file_ext('test-char@ja', 'jax')
|
||||
set helplang=ab,ja
|
||||
call s:check_help_file_ext('test-char@ja', 'jax')
|
||||
call s:check_help_file_ext('test-char@en', 'txt')
|
||||
endif
|
||||
catch
|
||||
call assert_exception('X')
|
||||
finally
|
||||
call s:doc_config_teardown()
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -31,6 +31,30 @@ function History_Tests(hist)
|
||||
call assert_equal('ls', histget(a:hist, -1))
|
||||
call assert_equal(4, histnr(a:hist))
|
||||
|
||||
let a=execute('history ' . a:hist)
|
||||
call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
|
||||
let a=execute('history all')
|
||||
call assert_match("^\n # .* history\n 3 buffers\n> 4 ls", a)
|
||||
|
||||
if len(a:hist) > 0
|
||||
let a=execute('history ' . a:hist . ' 2')
|
||||
call assert_match("^\n # \\S* history$", a)
|
||||
let a=execute('history ' . a:hist . ' 3')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers$", a)
|
||||
let a=execute('history ' . a:hist . ' 4')
|
||||
call assert_match("^\n # \\S* history\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' 3,4')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' -1')
|
||||
call assert_match("^\n # \\S* history\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' -2')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers$", a)
|
||||
let a=execute('history ' . a:hist . ' -2,')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' -3')
|
||||
call assert_match("^\n # \\S* history$", a)
|
||||
endif
|
||||
|
||||
" Test for removing entries matching a pattern
|
||||
for i in range(1, 3)
|
||||
call histadd(a:hist, 'text_' . i)
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
" Test for :mksession, :mkview and :loadview in latin1 encoding
|
||||
|
||||
set encoding=latin1
|
||||
scriptencoding latin1
|
||||
|
||||
if !has('multi_byte') || !has('mksession')
|
||||
finish
|
||||
endif
|
||||
|
||||
func Test_mksession()
|
||||
tabnew
|
||||
let wrap_save = &wrap
|
||||
set sessionoptions=buffers splitbelow fileencoding=latin1
|
||||
call setline(1, [
|
||||
\ 'start:',
|
||||
\ 'no multibyte chAracter',
|
||||
\ ' one leaDing tab',
|
||||
\ ' four leadinG spaces',
|
||||
\ 'two consecutive tabs',
|
||||
\ 'two tabs in one line',
|
||||
\ 'one ä multibyteCharacter',
|
||||
\ 'aä Ä two multiByte characters',
|
||||
\ 'Aäöü three mulTibyte characters'
|
||||
\ ])
|
||||
let tmpfile = tempname()
|
||||
exec 'w! ' . tmpfile
|
||||
/^start:
|
||||
set wrap
|
||||
vsplit
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
wincmd l
|
||||
|
||||
set nowrap
|
||||
/^start:
|
||||
norm! j16|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
call wincol()
|
||||
mksession! test_mks.out
|
||||
let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
|
||||
let expected = [
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|"
|
||||
\ ]
|
||||
call assert_equal(expected, li)
|
||||
tabclose!
|
||||
|
||||
call delete('test_mks.out')
|
||||
call delete(tmpfile)
|
||||
let &wrap = wrap_save
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
@@ -0,0 +1,104 @@
|
||||
" Test for :mksession, :mkview and :loadview in utf-8 encoding
|
||||
|
||||
set encoding=utf-8
|
||||
scriptencoding utf-8
|
||||
|
||||
if !has('multi_byte') || !has('mksession')
|
||||
finish
|
||||
endif
|
||||
|
||||
func Test_mksession_utf8()
|
||||
tabnew
|
||||
let wrap_save = &wrap
|
||||
set sessionoptions=buffers splitbelow fileencoding=utf-8
|
||||
call setline(1, [
|
||||
\ 'start:',
|
||||
\ 'no multibyte chAracter',
|
||||
\ ' one leaDing tab',
|
||||
\ ' four leadinG spaces',
|
||||
\ 'two consecutive tabs',
|
||||
\ 'two tabs in one line',
|
||||
\ 'one … multibyteCharacter',
|
||||
\ 'a “b” two multiByte characters',
|
||||
\ '“c”1€ three mulTibyte characters'
|
||||
\ ])
|
||||
let tmpfile = tempname()
|
||||
exec 'w! ' . tmpfile
|
||||
/^start:
|
||||
set wrap
|
||||
vsplit
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
wincmd l
|
||||
|
||||
set nowrap
|
||||
/^start:
|
||||
norm! j16|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
call wincol()
|
||||
mksession! test_mks.out
|
||||
let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
|
||||
let expected = [
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|"
|
||||
\ ]
|
||||
call assert_equal(expected, li)
|
||||
tabclose!
|
||||
|
||||
call delete('test_mks.out')
|
||||
call delete(tmpfile)
|
||||
let &wrap = wrap_save
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
@@ -65,6 +65,15 @@ function Test_tabpage()
|
||||
call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
|
||||
tabclose
|
||||
q
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop vertical-split-window" to jump test1 buffer
|
||||
tabedit test1
|
||||
vnew
|
||||
tabfirst
|
||||
tab drop test1
|
||||
call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
|
||||
1tabonly
|
||||
endif
|
||||
"
|
||||
"
|
||||
|
||||
@@ -779,6 +779,42 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
124,
|
||||
/**/
|
||||
123,
|
||||
/**/
|
||||
122,
|
||||
/**/
|
||||
121,
|
||||
/**/
|
||||
120,
|
||||
/**/
|
||||
119,
|
||||
/**/
|
||||
118,
|
||||
/**/
|
||||
117,
|
||||
/**/
|
||||
116,
|
||||
/**/
|
||||
115,
|
||||
/**/
|
||||
114,
|
||||
/**/
|
||||
113,
|
||||
/**/
|
||||
112,
|
||||
/**/
|
||||
111,
|
||||
/**/
|
||||
110,
|
||||
/**/
|
||||
109,
|
||||
/**/
|
||||
108,
|
||||
/**/
|
||||
107,
|
||||
/**/
|
||||
106,
|
||||
/**/
|
||||
|
||||
@@ -269,6 +269,11 @@
|
||||
# define UNUSED
|
||||
#endif
|
||||
|
||||
/* Used to check for "sun", "__sun" is used by newer compilers. */
|
||||
#if defined(__sun)
|
||||
# define SUN_SYSTEM
|
||||
#endif
|
||||
|
||||
/* if we're compiling in C++ (currently only KVim), the system
|
||||
* headers must have the correct prototypes or nothing will build.
|
||||
* conversely, our prototypes might clash due to throw() specifiers and
|
||||
@@ -1736,17 +1741,6 @@ void mch_memmove(void *, void *, size_t);
|
||||
void *vim_memset(void *, int, size_t);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MEMCMP
|
||||
# define vim_memcmp(p1, p2, len) memcmp((p1), (p2), (len))
|
||||
#else
|
||||
# ifdef HAVE_BCMP
|
||||
# define vim_memcmp(p1, p2, len) bcmp((p1), (p2), (len))
|
||||
# else
|
||||
int vim_memcmp(void *, void *, size_t);
|
||||
# define VIM_MEMCMP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(UNIX) || defined(FEAT_GUI) || defined(VMS) \
|
||||
|| defined(FEAT_CLIENTSERVER)
|
||||
# define USE_INPUT_BUF
|
||||
@@ -2501,7 +2495,7 @@ typedef enum
|
||||
#define FNE_INCL_BR 1 /* include [] in name */
|
||||
#define FNE_CHECK_START 2 /* check name starts with valid character */
|
||||
|
||||
#if (defined(sun) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
|
||||
#if (defined(SUN_SYSTEM) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
|
||||
&& defined(S_ISCHR)
|
||||
# define OPEN_CHR_FILES
|
||||
#endif
|
||||
|
||||
+4
-4
@@ -17,7 +17,7 @@ There are three ways to remove Vim:
|
||||
have to use uninstal.exe.
|
||||
|
||||
It's recommended to use the method that matches with how you installed Vim.
|
||||
Thus if you installed Vim by hand, deleted it by hand.
|
||||
Thus if you installed Vim by hand, delete it by hand.
|
||||
|
||||
The first two methods should be available from the Add/Remove software window
|
||||
and the Vim entry in the Start menu. If these have been removed already, find
|
||||
@@ -33,8 +33,8 @@ Here are guidelines for removing Vim by hand:
|
||||
menu entry. You only need to run uninstal.exe when you have installed the
|
||||
menu entry. You can also run uninstal.exe from the Control panel with the
|
||||
Add/Remove programs application.
|
||||
Note that uninstal.exe offers you to uninstal other items. You can skip
|
||||
this.
|
||||
Note that uninstal.exe offers you the option to uninstal other items. You
|
||||
can skip this.
|
||||
|
||||
2. Only if you have used the OLE version of gvim: Remove the registration of
|
||||
this program by running "gvim -unregister" in a console window.
|
||||
@@ -46,7 +46,7 @@ Here are guidelines for removing Vim by hand:
|
||||
If you created .bat files when installing Vim, also search for vim.bat,
|
||||
gvim.bat, etc.
|
||||
|
||||
4. If you completely want to delete vim, and are not going to install another
|
||||
4. If you want to completely delete vim, and are not going to install another
|
||||
version, you can delete the vimrc files that you created. These are
|
||||
normally located in a directory like "C:\vim". If the $VIM environment
|
||||
variable is set, it will tell the name of the directory. Normally you can
|
||||
|
||||
Reference in New Issue
Block a user