Compare commits

...

17 Commits

Author SHA1 Message Date
Bram Moolenaar
7cb769a69f patch 8.0.1301: generated license file for NSIS has a modeline
Problem:    Generated license file for NSIS has a modeline.
Solution:   Adjust the pattern for sed. (Ken Takata)
2017-11-16 17:36:02 +01:00
Bram Moolenaar
cd142e3369 patch 8.0.1300: file permissions may end up wrong when writing
Problem:    File permissions may end up wrong when writing.
Solution:   Use fchmod() instead of chmod() when possible.  Don't truncate
            until we know we can change the file.
2017-11-16 17:03:45 +01:00
Bram Moolenaar
a42ad57e48 patch 8.0.1299: bracketed paste does not work well in terminal window
Problem:    Bracketed paste does not work well in terminal window.
Solution:   Send translated string to job right away. (Ozaki Kiichi, closes
            #2341)
2017-11-16 13:08:04 +01:00
Bram Moolenaar
58a8f1706f patch 8.0.1298: missing test file
Problem:    Missing test file.
Solution:   Add samples/test000. (Christian Brabandt)
2017-11-14 20:23:15 +01:00
Bram Moolenaar
2392143236 patch 8.0.1297: +autoservername does not show enabled on MS-Windows
Problem:    +autoservername does not show enabled on MS-Windows.
Solution:   Always define the flag on MS-Windows. (Ken Takata)
2017-11-13 22:08:16 +01:00
Bram Moolenaar
1dcada1933 patch 8.0.1296: checking the same condition twice
Problem:    Checking the same condition twice. (John Marriott)
Solution:   Check blinkwait.
2017-11-13 21:10:04 +01:00
Bram Moolenaar
e42a6d2509 patch 8.0.1295: cannot automatically get a server name in a terminal
Problem:    Cannot automatically get a server name in a terminal.
Solution:   Add the --enable-autoservername flag to configure. (Cimbali,
            closes #2317)
2017-11-12 19:21:51 +01:00
Bram Moolenaar
2f27aab8e6 patch 8.0.1294: GUI: get stuck when splitting a terminal window
Problem:    GUI: get stuck when splitting a terminal window.
Solution:   Stop blinking when values become zero. (Hirohito Higashi)
2017-11-12 18:32:00 +01:00
Bram Moolenaar
60e73f2acc patch 8.0.1293: setting a breakpoint in the terminal debugger sometimes fails
Problem:    Setting a breakpoint in the terminal debugger sometimes fails.
Solution:   Interrupt the program if needed.  Set the interface to async.
2017-11-12 18:02:06 +01:00
Bram Moolenaar
d327b0c68f patch 8.0.1292: quick clicks in the WinBar start Visual mode
Problem:    Quick clicks in the WinBar start Visual mode.
Solution:   Use a double click in the WinBar like a normal click.
2017-11-12 16:56:12 +01:00
Bram Moolenaar
f8c53d3d26 patch 8.0.1291: C indent wrong when * immediately follows comment
Problem:    C indent wrong when * immediately follows comment. (John Bowler)
Solution:   Do not see "/*" after "*" as a comment start. (closes #2321)
2017-11-12 15:36:38 +01:00
Bram Moolenaar
80eaddd3a0 patch 8.0.1290: seq_cur of undotree() wrong after undo
Problem:    seq_cur of undotree() wrong after undo.
Solution:   Get the actual sequence number instead of decrementing the current
            one. (Ozaki Kiichi, closes #2319)
2017-11-11 23:37:08 +01:00
Bram Moolenaar
7f2e9d7c9c Update runtime files. 2017-11-11 20:58:53 +01:00
Bram Moolenaar
13e904199c patch 8.0.1289: mkview always includes the local directory
Problem:    Mkview always includes the local directory.
Solution:   Add the "curdir" value in 'viewoptions'. (Eric Roberts, closes
            #2316)
2017-11-11 18:16:48 +01:00
Bram Moolenaar
ae147ab2d7 patch 8.0.1288: GUI: cannot drag the statusline of a terminal window
Problem:    GUI: cannot drag the statusline of a terminal window.
Solution:   Handle the TERMINAL state. (Hirohito Higashi)
2017-11-11 17:09:09 +01:00
Bram Moolenaar
aeeb6888ca patch 8.0.1287: temp file used for viminfo may have wrong permissions
Problem:    The temp file used when updating the viminfo file may have the
            wrong permissions if setting the group fails.
Solution:   Check if the group matches and reduce permissions if not.
2017-11-11 16:45:19 +01:00
Bram Moolenaar
5fd8b78214 patch 8.0.1286: occasional crash when using a channel
Problem:    Occasional crash when using a channel. (Marek)
Solution:   Decrement reference count later. (closes #2315)
2017-11-11 15:54:00 +01:00
44 changed files with 637 additions and 204 deletions

View File

@@ -135,6 +135,7 @@ SRC_ALL = \
src/testdir/bench*.in \
src/testdir/bench*.vim \
src/testdir/samples/*.txt \
src/testdir/samples/test000 \
src/testdir/if_ver*.vim \
src/testdir/xterm_ramp.vim \
src/proto.h \

View File

@@ -343,7 +343,7 @@ xxd.man: xxd.1
nroff -man xxd.1 | sed -e s/.//g > xxd.man
uganda.nsis.txt: uganda.txt
sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78://' \
sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78:.*//' \
uganda.txt | uniq >uganda.nsis.txt
# Awk version of .txt to .html conversion.

View File

@@ -8820,6 +8820,7 @@ amiga Amiga version of Vim.
arabic Compiled with Arabic support |Arabic|.
arp Compiled with ARP support (Amiga).
autocmd Compiled with autocommand support. |autocommand|
autoservername Automatically enable |clientserver|
balloon_eval Compiled with |balloon-eval| support.
balloon_multiline GUI supports multiline balloons.
beos BeOS version of Vim.

View File

@@ -602,7 +602,7 @@ MANPAGER *manpager.vim*
The :Man command allows you to turn Vim into a manpager (that syntax highlights
manpages and follows linked manpages on hitting CTRL-]).
Works on:
Tested on:
- Linux
- Mac OS
@@ -617,25 +617,36 @@ Untested:
- BeOS
- OS/2
For bash,zsh,ksh or dash by adding to the config file (.bashrc,.zshrc, ...)
If man sets the $MAN_PN environment variable, like man-db, the most common
implementation on Linux, then the "env MAN_PN=1 " part below should NOT be
set, that is, the "env MAN_PN=1" should be omitted! Otherwise, the Vim
manpager does not correctly recognize manpages whose title contains a capital
letter. See the discussion on
https://groups.google.com/forum/#!topic/vim_dev/pWZmt_7GkxI
For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...)
export MANPAGER="env MAN_PN=1 vim -M +MANPAGER -"
For (t)csh, add to the config file
setenv MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
For fish, add to the config file
set -x MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
On OpenBSD:
export MANPAGER="env MAN_PN=1 vim -M +MANPAGER"
For (t)csh by adding to the config file
If you experience still issues on manpages whose titles do not contain capital
letters, then try adding MANPATH=${MANPATH} after MAN_PN=1. If your manpages do
not show up localized, then try adding, LANGUAGE=${LANG} after MAN_PN=1. See
setenv MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
https://github.com/vim/vim/issues/1002
For fish by adding to the config file
set -x MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
If man sets the $MAN_PN environment variable, like man-db, the most common
implementation on Linux and Mac OS, then the "env MAN_PN=1 " part above is
superfluous.
PDF *ft-pdf-plugin*

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 8.0. Last change: 2017 Mar 09
*if_pyth.txt* For Vim version 8.0. Last change: 2017 Nov 09
VIM REFERENCE MANUAL by Paul Moore

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.0. Last change: 2017 Nov 02
*options.txt* For Vim version 8.0. Last change: 2017 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5336,7 +5336,7 @@ A jump table for the options with a short description can be found at |Q_op|.
sysmouse and Linux console with gpm). For using the mouse in the
GUI, see |gui-mouse|.
The mouse can be enabled for different modes:
n Normal mode
n Normal mode and Terminal modes
v Visual mode
i Insert mode
c Command-line mode
@@ -8387,7 +8387,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'viewoptions'* *'vop'*
'viewoptions' 'vop' string (default: "folds,options,cursor")
'viewoptions' 'vop' string (default: "folds,options,cursor,curdir")
global
{not in Vi}
{not available when compiled without the |+mksession|
@@ -8405,6 +8405,7 @@ A jump table for the options with a short description can be found at |Q_op|.
slashes
unix with Unix end-of-line format (single <NL>), even when
on Windows or DOS
curdir the window-local directory, if set with `:lcd`
"slash" and "unix" are useful on Windows when sharing view files
with Unix. The Unix version of Vim cannot source dos format scripts,

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.0. Last change: 2017 Oct 24
*starting.txt* For Vim version 8.0. Last change: 2017 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1418,7 +1418,7 @@ The output of ":mkview" contains these items:
5. The scroll position and the cursor position in the file. Doesn't work very
well when there are closed folds.
6. The local current directory, if it is different from the global current
directory.
directory and 'viewoptions' contains "curdir".
Note that Views and Sessions are not perfect:
- They don't restore everything. For example, defined functions, autocommands
@@ -1530,7 +1530,7 @@ Notes for Unix:
you have worked with.
- If you want to share the viminfo file with other users (e.g. when you "su"
to another user), you can make the file writable for the group or everybody.
Vim will preserve this when writing new viminfo files. Be careful, don't
Vim will preserve this when replacing the viminfo file. Be careful, don't
allow just anybody to read and write your viminfo file!
- Vim will not overwrite a viminfo file that is not writable by the current
"real" user. This helps for when you did "su" to become root, but your

View File

@@ -307,6 +307,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'go-g' options.txt /*'go-g'*
'go-h' options.txt /*'go-h'*
'go-i' options.txt /*'go-i'*
'go-k' options.txt /*'go-k'*
'go-l' options.txt /*'go-l'*
'go-m' options.txt /*'go-m'*
'go-p' options.txt /*'go-p'*
@@ -8890,16 +8891,29 @@ termcap-cursor-color term.txt /*termcap-cursor-color*
termcap-cursor-shape term.txt /*termcap-cursor-shape*
termcap-options term.txt /*termcap-options*
termcap-title term.txt /*termcap-title*
termdebug-commands terminal.txt /*termdebug-commands*
termdebug-communication terminal.txt /*termdebug-communication*
termdebug-customizing terminal.txt /*termdebug-customizing*
termdebug-example terminal.txt /*termdebug-example*
termdebug-starting terminal.txt /*termdebug-starting*
termdebug-stepping terminal.txt /*termdebug-stepping*
termdebug-variables terminal.txt /*termdebug-variables*
terminal terminal.txt /*terminal*
terminal-colors os_unix.txt /*terminal-colors*
terminal-cursor-style terminal.txt /*terminal-cursor-style*
terminal-debug terminal.txt /*terminal-debug*
terminal-functions usr_41.txt /*terminal-functions*
terminal-info term.txt /*terminal-info*
terminal-key-codes term.txt /*terminal-key-codes*
terminal-ms-windows terminal.txt /*terminal-ms-windows*
terminal-options term.txt /*terminal-options*
terminal-output-codes term.txt /*terminal-output-codes*
terminal-resizing terminal.txt /*terminal-resizing*
terminal-size-color terminal.txt /*terminal-size-color*
terminal-special-keys terminal.txt /*terminal-special-keys*
terminal-testing terminal.txt /*terminal-testing*
terminal-typing terminal.txt /*terminal-typing*
terminal-unix terminal.txt /*terminal-unix*
terminal-use terminal.txt /*terminal-use*
terminal.txt terminal.txt /*terminal.txt*
terminfo term.txt /*terminfo*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.0. Last change: 2017 Oct 29
*terminal.txt* For Vim version 8.0. Last change: 2017 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -14,9 +14,25 @@ The terminal feature is optional, use this to check if your Vim has it: >
If the result is "1" you have it.
1. Basic use |terminal-use|
2. Remote testing |terminal-testing|
3. Debugging |terminal-debug|
1. Basic use |terminal-use|
Typing |terminal-typing|
Size and color |terminal-size-color|
Syntax |:terminal|
Resizing |terminal-resizing|
Terminal Modes |Terminal-mode|
Cursor style |terminal-cursor-style|
Special keys |terminal-special-keys|
Unix |terminal-unix|
MS-Windows |terminal-ms-windows|
2. Remote testing |terminal-testing|
3. Debugging |terminal-debug|
Starting |termdebug-starting|
Example session |termdebug-example|
Stepping through code |termdebug-stepping|
Inspecting variables |termdebug-variables|
Other commands |termdebug-commands|
Communication |termdebug-communication|
Customizing |termdebug-customizing|
{Vi does not have any of these commands}
{only available when compiled with the |+terminal| feature}
@@ -44,7 +60,7 @@ the job. This uses a pty when possible. You can click outside of the
terminal window to move keyboard focus elsewhere.
CTRL-W can be used to navigate between windows and other CTRL-W commands, e.g.:
CTRL-W CTRL-W move focus to the next window
CTRL-W CTRL-W move focus to the next window
CTRL-W : enter an Ex command
See |CTRL-W| for more commands.
@@ -64,7 +80,7 @@ the job. For example:
'termkey' : enter an Ex command
'termkey' 'termkey' send 'termkey' to the job in the terminal
'termkey' . send a CTRL-W to the job in the terminal
'termkey' N go to terminal Normal mode, see below
'termkey' N go to terminal Normal mode, see below
'termkey' CTRL-N same as CTRL-W N
'termkey' CTRL-C same as |t_CTRL-W_CTRL-C|
*t_CTRL-\_CTRL-N*
@@ -92,7 +108,7 @@ options specifically for the window and buffer. Example: >
Size and color ~
*terminal-size-color*
See option 'termsize' for controlling the size of the terminal window.
(TODO: scrolling when the terminal is larger than the window)
@@ -201,7 +217,7 @@ the buffer name will still be set to the command.
Resizing ~
*terminal-resizing*
The size of the terminal can be in one of three modes:
1. The 'termsize' option is empty: The terminal size follows the window size.
@@ -251,7 +267,7 @@ It is not possible to enter Insert mode from Terminal-Job mode.
Cursor style ~
*terminal-cursor-style*
By default the cursor in the terminal window uses a not blinking block. The
normal xterm escape sequences can be used to change the blinking state and the
shape. Once focus leaves the terminal window Vim will restore the original
@@ -263,8 +279,21 @@ is inverted. Since Vim cannot detect this, the terminal window cursor
blinking will also be inverted.
Unix ~
Special keys ~
*terminal-special-keys*
Since the terminal emulator simulates an xterm, only escape sequences that
both Vim and xterm recognize will be available in the terminal window. If you
want to pass on other escape sequences to the job running in the terminal you
need to set up forwarding. Example: >
tmap <expr> <Esc>]b SendToTerm("\<Esc>]b")
func SendToTerm(what)
call term_sendkeys('', a:what)
return ''
endfunc
Unix ~
*terminal-unix*
On Unix a pty is used to make it possible to run all kinds of commands. You
can even run Vim in the terminal! That's used for debugging, see below.
@@ -287,7 +316,7 @@ This will open the file "some_file.c" and put the cursor on line 123.
MS-Windows ~
*terminal-ms-windows*
On MS-Windows winpty is used to make it possible to run all kind of commands.
Obviously, they must be commands that run in a terminal, not open their own
window.
@@ -330,7 +359,7 @@ Vim this also works remotely over an ssh connection.
Starting ~
*termdebug-starting*
Load the plugin with this command: >
packadd termdebug
< *:Termdebug*
@@ -360,7 +389,7 @@ opened windows are closed.
Example session ~
*termdebug-example*
Start in the Vim "src" directory and build Vim: >
% make
Start Vim: >
@@ -416,36 +445,42 @@ a deeper level.
Stepping through code ~
*termdebug-stepping*
Put focus on the gdb window to type commands there. Some common ones are:
- CTRL-C interrupt the program
- next execute the current line and stop at the next line
- step execute the current line and stop at the next statement, entering
functions
- finish execute until leaving the current function
- where show the stack
- frame N go to the Nth stack frame
- continue continue execution
- CTRL-C interrupt the program
- next execute the current line and stop at the next line
- step execute the current line and stop at the next statement,
entering functions
- finish execute until leaving the current function
- where show the stack
- frame N go to the Nth stack frame
- continue continue execution
In the window showing the source code some commands can used to control gdb:
:Break set a breakpoint at the current line; a sign will be displayed
:Delete delete a breakpoint at the current line
:Step execute the gdb "step" command
:Over execute the gdb "next" command (:Next is a Vim command)
:Finish execute the gdb "finish" command
:Continue execute the gdb "continue" command
In the window showing the source code these commands can used to control gdb:
:Run [args] run the program with [args] or the previous arguments
:Arguments {args} set arguments for the next :Run
:Break set a breakpoint at the current line; a sign will be displayed
:Delete delete a breakpoint at the current line
:Step execute the gdb "step" command
:Over execute the gdb "next" command (:Next is a Vim command)
:Finish execute the gdb "finish" command
:Continue execute the gdb "continue" command
:Stop interrupt the program
The plugin adds a window toolbar with these entries:
Step :Step
Next :Over
Finish :Finish
Cont :Continue
Eval :Evaluate
Step :Step
Next :Over
Finish :Finish
Cont :Continue
Stop :Stop
Eval :Evaluate
This way you can use the mouse to perform the most common commands.
Inspecting variables ~
*termdebug-variables*
:Evaluate evaluate the expression under the cursor
K same
:Evaluate {expr} evaluate {expr}
@@ -455,20 +490,20 @@ This is similar to using "print" in the gdb window.
Other commands ~
*termdebug-commands*
:Gdb jump to the gdb window
:Program jump to the window with the running program
Communication ~
*termdebug-communication*
There is another, hidden, buffer, which is used for Vim to communicate with
gdb. The buffer name is "gdb communication". Do not delete this buffer, it
will break the debugger.
Customizing ~
*termdebug-customizing*
To change the name of the gdb command, set the "termdebugger" variable before
invoking `:Termdebug`: >
let termdebugger = "mygdb"

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2017 Nov 05
*todo.txt* For Vim version 8.0. Last change: 2017 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,6 +35,10 @@ entered there will not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Permission of viminfo tempfile can be wrong. (Simon Ruderich)
Always use 600 ? Also avoids groups problem.
patch from Simon Ruderich, Nov 8
No maintainer for Vietnamese translations.
No maintainer for Simplified Chinese translations.
@@ -132,8 +136,8 @@ Regexp problems:
Include a few color schemes, based on popularity:
http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search
http://vimawesome.com/?q=tag:color-scheme
Use names that indicate their appearnce (Christian Brabandt, 2017 Aug 3)
- monokai - Xia Crusoe (2017 Aug 4)
Use names that indicate their apperance (Christian Brabandt, 2017 Aug 3)
- monokai - Xia Crusoe (2017 Aug 4)
- seoul256 - Christian Brabandt (2017 Aug 3)
- gruvbox - Christian Brabandt (2017 Aug 3)
- janah - Marco Hinz (2017 Aug 4)
@@ -141,7 +145,8 @@ Use names that indicate their appearnce (Christian Brabandt, 2017 Aug 3)
Suggested by Hiroki Kokubun:
- [Iceberg](https://github.com/cocopon/iceberg.vim) (my one)
- [hybrid](https://github.com/w0ng/vim-hybrid)
Include solarized color scheme?
Include solarized color scheme?, it does not support termguicolors.
-> Make check for colorscheme that it's sane.
Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in do_sub() (#2249)
@@ -178,9 +183,6 @@ Error in emsg with buggy script. (Dominique, 2017 Apr 30)
When a timer is running and typing CTRL-R on the command line, it is not
redrawn properly. (xtal8, 2017 Oct 23, #2241)
Patch for manpager plugin. (Lcd, 2017 Oct 12)
Asked maintainer.
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
@@ -216,15 +218,7 @@ When bracketed paste is used, pasting at the ":append" prompt does not get the
line breaks. (Ken Takata, 2017 Aug 22)
Patch for 24 bit color support in MS-Windows console, using vcon. (Nobuhiro
Takasaki, 2017 Oct 1, #2060). Should not set 'tgc' automatically.
Patch to change GUI behavior: instead of changing the window size change the
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
#703)
Patch to skip globpath() for color schemes, keymaps and compiler settings.
So that loading menus is faster. (Ken Takata, 2017 Oct 23)
Update to expand the menus in a CursorHold autocmd. (2017 Oct 25)
Takasaki, 2017 Oct 1, #2060). Ready to include now?
Memory leaks in test_channel? (or is it because of fork())
Memory leak in test_arabic.
@@ -296,6 +290,9 @@ Patch to add argument to :cquit. (Thinca, 2014 Oct 12)
Python: After "import vim" error messages only show the first line of the
stack trace. (Yggdroot, 2017 Jul 28, #1887)
Patch to add "module" to quickfix entries. (Marcin Szamotulski, Coot, 2017 Jun
8, #1757)
When checking if a bufref is valid, also check the buffer number, to catch the
case of :bwipe followed by :new.
@@ -499,8 +496,6 @@ Patch for wrong cursor position on wrapped line, involving breakindent.
(Ozaki Kiichi, 2016 Nov 25)
Does this also fix #1408 ?
Patch to add "module" to quickfix entries. (Coot, 2017 Jun 8, #1757)
'cursorline' and match interfere. (Ozaki Kiichi, 2017 Jun 23, #1792)
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
@@ -5206,7 +5201,7 @@ Swap (.swp) files:
- Add an option to create a swap file only when making the first change to
the buffer. (Liang) Or only when the buffer is not read-only.
- Add option to set "umask" for backup files and swap files (Antwerpen).
'backupumask' and 'swapumask'? Or 'umaskback' and 'umaskswap'?
'backupumask' and 'swapumask'? Or 'umaskbackup' and 'umaskswap'?
- When editing a readonly file, don't use a swap file but read parts from the
original file. Also do this when the file is huge (>'maxmem'). We do
need to load the file once to count the number of lines? Perhaps keep a

View File

@@ -309,6 +309,7 @@ g8 Print the hex values of the bytes used in the
*+ARP* Amiga only: ARP support included
B *+arabic* |Arabic| language support
N *+autocmd* |:autocmd|, automatic commands
H *+autoservername* Automatically enable |clientserver|
m *+balloon_eval* |balloon-eval| support. Included when compiling with
supported GUI (Motif, GTK, GUI) and either
Netbeans/Sun Workshop integration or |+eval| feature.

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2017 Jan 18
" Last Change: 2017 Nov 11
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -15,12 +15,6 @@ if &filetype == "man"
endif
let b:did_ftplugin = 1
" Ensure Vim is not recursively invoked (man-db does this)
" when doing ctrl-[ on a man page reference.
if exists("$MANPAGER")
let $MANPAGER = ""
endif
" allow dot and dash in manual page name.
setlocal iskeyword+=\.,-
@@ -176,7 +170,11 @@ func <SID>GetPage(...)
let $MANWIDTH = winwidth(0)
let unsetwidth = 1
endif
silent exec "r !man ".s:GetCmdArg(sect, page)." | col -b"
" Ensure Vim is not recursively invoked (man-db does this) when doing ctrl-[
" on a man page reference by unsetting MANPAGER.
silent exec "r !env -u MANPAGER man ".s:GetCmdArg(sect, page)." | col -b"
if unsetwidth
let $MANWIDTH = ''
endif

View File

@@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Fri, 20 October 2017
" Last Change: Thur, 09 November 2017
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -29,8 +29,8 @@ let b:next_endtoplevel='\v%$\|\S.*\n+(def\|class)'
let b:prev_endtoplevel='\v\S.*\n+(def\|class)'
let b:next='\v%$\|^\s*(class\|def\|async def)>'
let b:prev='\v^\s*(class\|def\|async def)>'
let b:next_end='\v\S\n*(%$\|^\s*(class\|def\|async def)\|^\S)'
let b:prev_end='\v\S\n*(^\s*(class\|def\|async def)\|^\S)'
let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)'
let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)'
execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W')<cr>"
execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb')<cr>"
@@ -43,8 +43,8 @@ execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_en
execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W')<cr>"
execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb')<cr>"
execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>"
execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', 0)<cr>"
execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W')<cr>"
execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb')<cr>"
execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0)<cr>"
@@ -52,8 +52,8 @@ execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_en
execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W')<cr>"
execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb')<cr>"
execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>"
execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', 0)<cr>"
execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W')<cr>"
execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb')<cr>"
execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0)<cr>"

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Sep 07
" Last Change: 2017 Nov 06
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -25,6 +25,9 @@ setlocal fo-=t fo+=croql
" keyword character. E.g., for netrw#Nread().
setlocal isk+=#
" Use :help to lookup the keyword under the cursor with K.
setlocal keywordprg=:help
" Set 'comments' to format dashed lists in comments
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"

View File

@@ -20,6 +20,9 @@ if exists(':Termdebug')
finish
endif
" Uncomment this line to write logging in "debuglog".
" call ch_logfile('debuglog', 'w')
" The command that starts debugging, e.g. ":Termdebug vim".
" To end type "quit" in the gdb window.
command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>)
@@ -31,6 +34,7 @@ endif
let s:pc_id = 12
let s:break_id = 13
let s:stopped = 1
if &background == 'light'
hi default debugPC term=reverse ctermbg=lightblue guibg=lightblue
@@ -83,11 +87,11 @@ func s:StartDebug(cmd)
" Add -quiet to avoid the intro message causing a hit-enter prompt.
let cmd = [g:termdebugger, '-quiet', '-tty', pty, a:cmd]
echomsg 'executing "' . join(cmd) . '"'
let gdbbuf = term_start(cmd, {
let s:gdbbuf = term_start(cmd, {
\ 'exit_cb': function('s:EndDebug'),
\ 'term_finish': 'close',
\ })
if gdbbuf == 0
if s:gdbbuf == 0
echoerr 'Failed to open the gdb terminal window'
exe 'bwipe! ' . s:ptybuf
exe 'bwipe! ' . s:commbuf
@@ -97,7 +101,12 @@ func s:StartDebug(cmd)
" Connect gdb to the communication pty, using the GDB/MI interface
" If you get an error "undefined command" your GDB is too old.
call term_sendkeys(gdbbuf, 'new-ui mi ' . commpty . "\r")
call term_sendkeys(s:gdbbuf, 'new-ui mi ' . commpty . "\r")
" Interpret commands while the target is running. This should usualy only be
" exec-interrupt, since many commands don't work properly while the target is
" running.
call s:SendCommand('-gdb-set mi-async on')
" Sign used to highlight the line where the program has stopped.
" There can be only one.
@@ -170,6 +179,9 @@ func s:InstallCommands()
command Step call s:SendCommand('-exec-step')
command Over call s:SendCommand('-exec-next')
command Finish call s:SendCommand('-exec-finish')
command -nargs=* Run call s:Run(<q-args>)
command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . <q-args>)
command Stop call s:SendCommand('-exec-interrupt')
command Continue call s:SendCommand('-exec-continue')
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
command Gdb call win_gotoid(s:gdbwin)
@@ -183,6 +195,7 @@ func s:InstallCommands()
nnoremenu WinBar.Next :Over<CR>
nnoremenu WinBar.Finish :Finish<CR>
nnoremenu WinBar.Cont :Continue<CR>
nnoremenu WinBar.Stop :Stop<CR>
nnoremenu WinBar.Eval :Evaluate<CR>
endif
endfunc
@@ -194,6 +207,9 @@ func s:DeleteCommands()
delcommand Step
delcommand Over
delcommand Finish
delcommand Run
delcommand Arguments
delcommand Stop
delcommand Continue
delcommand Evaluate
delcommand Gdb
@@ -206,6 +222,7 @@ func s:DeleteCommands()
aunmenu WinBar.Next
aunmenu WinBar.Finish
aunmenu WinBar.Cont
aunmenu WinBar.Stop
aunmenu WinBar.Eval
endif
@@ -220,8 +237,19 @@ endfunc
" :Break - Set a breakpoint at the cursor position.
func s:SetBreakpoint()
call term_sendkeys(s:commbuf, '-break-insert --source '
\ . fnameescape(expand('%:p')) . ' --line ' . line('.') . "\r")
" Setting a breakpoint may not work while the program is running.
" Interrupt to make it work.
let do_continue = 0
if !s:stopped
let do_continue = 1
call s:SendCommand('-exec-interrupt')
sleep 10m
endif
call s:SendCommand('-break-insert --source '
\ . fnameescape(expand('%:p')) . ' --line ' . line('.'))
if do_continue
call s:SendCommand('-exec-continue')
endif
endfunc
" :Delete - Delete a breakpoint at the cursor position.
@@ -244,6 +272,13 @@ func s:SendCommand(cmd)
call term_sendkeys(s:commbuf, a:cmd . "\r")
endfunc
func s:Run(args)
if a:args != ''
call s:SendCommand('-exec-arguments ' . a:args)
endif
call s:SendCommand('-exec-run')
endfunc
" :Evaluate - evaluate what is under the cursor
func s:Evaluate(range, arg)
if a:arg != ''
@@ -259,7 +294,7 @@ func s:Evaluate(range, arg)
else
let expr = expand('<cexpr>')
endif
call term_sendkeys(s:commbuf, '-data-evaluate-expression "' . expr . "\"\r")
call s:SendCommand('-data-evaluate-expression "' . expr . '"')
let s:evalexpr = expr
endfunc
@@ -269,7 +304,7 @@ func s:HandleEvaluate(msg)
let value = substitute(value, '\\"', '"', 'g')
echomsg '"' . s:evalexpr . '": ' . value
if s:evalexpr[0] != '*' && value =~ '^0x' && value !~ '"$'
if s:evalexpr[0] != '*' && value =~ '^0x' && value != '0x0' && value !~ '"$'
" Looks like a pointer, also display what it points to.
let s:evalexpr = '*' . s:evalexpr
call term_sendkeys(s:commbuf, '-data-evaluate-expression "' . s:evalexpr . "\"\r")
@@ -286,6 +321,12 @@ endfunc
func s:HandleCursor(msg)
let wid = win_getid(winnr())
if a:msg =~ '^\*stopped'
let s:stopped = 1
elseif a:msg =~ '^\*running'
let s:stopped = 0
endif
if win_gotoid(s:startwin)
let fname = substitute(a:msg, '.*fullname="\([^"]*\)".*', '\1', '')
if a:msg =~ '^\(\*stopped\|=thread-selected\)' && filereadable(fname)

View File

@@ -1,6 +1,6 @@
" Vim plugin for using Vim as manpager.
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
" Last Change: 2016 May 20
" Last Change: 2017 November 07
" $MAN_PN is supposed to be set by MANPAGER, see ":help manpager.vim".
if empty($MAN_PN)
@@ -10,17 +10,17 @@ endif
command! -nargs=0 MANPAGER call s:MANPAGER() | delcommand MANPAGER
function! s:MANPAGER()
let page_pattern = '\v\w+%([-_.]\w+)*'
let page_pattern = '\v\w[-_.:0-9A-Za-z]*'
let sec_pattern = '\v\w+%(\+\w+)*'
let pagesec_pattern = '\v(' . page_pattern . ')\((' . sec_pattern . ')\)'
if $MAN_PN is '1'
let manpage = matchstr( getline(1), '^' . pagesec_pattern )
let manpage = tolower(matchstr( getline(nextnonblank(1)), '^' . pagesec_pattern ))
else
let manpage = expand('$MAN_PN')
let manpage = expand($MAN_PN)
endif
let page_sec = matchlist(tolower(manpage), '^' . pagesec_pattern . '$')
let page_sec = matchlist(manpage, '^' . pagesec_pattern . '$')
bwipe!

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2017 Aug 18
" Last Change: 2017 Nov 04
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim
" Standard syntax initialization
@@ -17,6 +17,8 @@ set cpo&vim
" Should match case except for the keys of each field
syn case match
syn iskeyword @,48-57,-,/
" Everything that is not explicitly matched by the rules below
syn match debcontrolElse "^.*$"
@@ -24,24 +26,50 @@ syn match debcontrolElse "^.*$"
syn match debControlComma ",[ \t]*"
syn match debControlSpace "[ \t]"
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\|sh3\|sh4eb\|sh4\|sh\|sparc64\|sparc\|x32\)'
let s:pairs = 'hurd-i386\|kfreebsd-i386\|kfreebsd-amd64\|knetbsd-i386\|kopensolaris-i386\|netbsd-alpha\|netbsd-i386'
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'
\, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32'
\ ]
let s:pairs = [
\ 'hurd-i386', 'kfreebsd-i386', 'kfreebsd-amd64', 'knetbsd-i386'
\, 'kopensolaris-i386', 'netbsd-alpha', 'netbsd-i386'
\ ]
" Define some common expressions we can use later on
exe 'syn match debcontrolArchitecture contained "\%(all\|'. s:kernels .'-any\|\%(any-\)\='. s:archs .'\|'. s:pairs .'\|any\)"'
syn keyword debcontrolArchitecture contained all any
exe 'syn keyword debcontrolArchitecture contained '. join(map(s:kernels, {k,v -> v .'-any'}))
exe 'syn keyword debcontrolArchitecture contained '. join(map(s:archs, {k,v -> 'any-'.v}))
exe 'syn keyword debcontrolArchitecture contained '. join(s:archs)
exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs)
unlet s:kernels s:archs s:pairs
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
let s:sections = [
\ 'admin', 'cli-mono', 'comm', 'database', 'debian-installer', 'debug'
\, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded'
\, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics'
\, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection'
\, 'java', 'javascript', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net'
\, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python'
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex'
\, 'utils', 'vcs', 'video', 'web', 'x11', 'xfce', 'zope'
\ ]
syn keyword debcontrolMultiArch contained no foreign allowed same
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java%(script)=|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
syn match debcontrolPackageType contained "u\?deb"
syn keyword debcontrolPriority contained extra important optional required standard
exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\%('.join(s:sections, '\|').'\)"'
syn keyword debcontrolPackageType contained udeb deb
syn match debcontrolVariable contained "\${.\{-}}"
syn match debcontrolDmUpload contained "\cyes"
syn keyword debcontrolDmUpload contained yes
syn keyword debcontrolYesNo contained yes no
syn match debcontrolR3 contained "\<\%(no\|binary-targets\|[[:graph:]]\+/[[:graph:]]\+\%( \+[[:graph:]]\+/[[:graph:]]\+\)*\)\>"
unlet s:sections
" A URL (using the domain name definitions from RFC 1034 and 1738), right now
" only enforce protocol and some sanity on the server/path part;
@@ -59,15 +87,28 @@ syn match debcontrolComment "^#.*$" contains=@Spell
syn case ignore
" List of all legal keys
syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\|\%(XS-\)\=Testsuite\): *"
" List of all legal keys, in order, from deb-src-control(5)
" Source fields
syn match debcontrolKey contained "^\%(Source\|Maintainer\|Uploaders\|Standards-Version\|Description\|Homepage\|Bugs\|Rules-Requires-Root\): *"
syn match debcontrolKey contained "^\%(XS-\)\=Vcs-\%(Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\|Browser\): *"
syn match debcontrolKey contained "^\%(Origin\|Section\|Priority\): *"
syn match debcontrolKey contained "^Build-\%(Depends\|Conflicts\)\%(-Arch\|-Indep\)\=: *"
" Binary fields
syn match debcontrolKey contained "^\%(Package\%(-Type\)\=\|Architecture\|Build-Profiles\): *"
syn match debcontrolKey contained "^\%(\%(Build-\)\=Essential\|Multi-Arch\|Tag\): *"
syn match debcontrolKey contained "^\%(\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\): *"
syn match debcontrolKey contained "^\%(Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): *"
" User-defined fields
syn match debcontrolKey contained "^X[SBC]\{0,3\}\%(-Private\)\=-[-a-zA-Z0-9]\+: *"
syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *"
" Fields for which we do strict syntax checking
syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline
syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
syn region debcontrolStrictField start="^\%(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline
@@ -77,10 +118,12 @@ syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=deb
syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline
syn region debcontrolStrictField start="^Rules-Requires-Root" end="$" contains=debcontrolKey,debcontrolR3 oneline
syn region debcontrolStrictField start="^\%(Build-\)\=Essential" end="$" contains=debcontrolKey,debcontrolYesNo oneline
" Catch-all for the other legal fields
syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
" Associate our matches and regions with pretty colours
@@ -102,6 +145,8 @@ hi def link debcontrolVcsCvs Identifier
hi def link debcontrolVcsGit Identifier
hi def link debcontrolHTTPUrl Identifier
hi def link debcontrolDmUpload Identifier
hi def link debcontrolYesNo Identifier
hi def link debcontrolR3 Identifier
hi def link debcontrolComment Comment
hi def link debcontrolElse Special

View File

@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2017 Apr 22
" Last Change: 2017 Oct 28
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
" Standard syntax initialization
@@ -23,18 +23,18 @@ let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
\
\ 'trusty', 'xenial', 'yakkety', 'zesty', 'artful', 'devel'
\ 'trusty', 'xenial', 'zesty', 'artful', 'bionic', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily'
\ 'utopic', 'vivid', 'wily', 'yakkety'
\ ]
let &cpo=s:cpo

View File

@@ -2,8 +2,8 @@
" Language: fstab file
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
" URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim
" Last Change: 2013 May 21
" Version: 1.0
" Last Change: 2017 Nov 09
" Version: 1.2
"
" Credits:
" David Necas (Yeti) <yeti@physics.muni.cz>
@@ -38,10 +38,14 @@ syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained
syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts devtmpfs sysfs usbfs
syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
syn keyword fsDeviceKeyword contained PARTLABEL nextgroup=fsDevicePARTLABEL
syn keyword fsDeviceKeyword contained PARTUUID nextgroup=fsDevicePARTUUID
syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs
syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/
syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDevicePARTLABEL contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDevicePARTUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator
" Mount Point
@@ -64,7 +68,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-]\+/
syn keyword fsOptionsYesNo yes no
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
syn keyword fsOptionsSize 512 1024 2048
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user users xx
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx
syn match fsOptionsGeneral /_netdev/
" Options: adfs
@@ -137,7 +141,7 @@ syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOp
syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber
" Options: ffs
syn keyword fsOptionsKeyWords contained softdep
syn keyword fsOptionsKeyWords contained noperm softdep
" Options: hpfs
syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase
@@ -228,7 +232,6 @@ syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster
" Whole line comments
syn match fsCommentLine /^#.*$/ contains=@Spell
hi def link fsOperator Operator
hi def link fsComment Comment
hi def link fsCommentLine Comment
@@ -237,15 +240,17 @@ hi def link fsTypeKeyword Type
hi def link fsDeviceKeyword Identifier
hi def link fsDeviceLabel String
hi def link fsDeviceUUID String
hi def link fsDevicePARTLABEL String
hi def link fsDevicePARTUUID String
hi def link fsDeviceSshfs String
hi def link fsFreqPassNumber Number
if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1
hi def link fsTypeUnknown Error
hi def link fsTypeUnknown Error
endif
if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1
hi def link fsDeviceError Error
hi def link fsDeviceError Error
endif
hi def link fsMountPointError Error
@@ -278,7 +283,6 @@ hi def link fsOptionsUfsError String
hi def link fsOptionsVfatShortname String
let b:current_syntax = "fstab"
let &cpo = s:cpo_save

View File

@@ -512,7 +512,7 @@ if !exists("g:tex_no_math")
if &ambw == "double" || exists("g:tex_usedblwidth")
let s:texMathDelimList= s:texMathDelimList + [
\ ['\\langle' , '〈'] ,
\ ['\\rangle' , '〉'] ,
\ ['\\rangle' , '〉']]
else
let s:texMathDelimList= s:texMathDelimList + [
\ ['\\langle' , '<'] ,

View File

@@ -570,6 +570,9 @@ CClink = $(CC)
# This disables the dialog that asks you if you want to save files or not.
#CONF_OPT_XSMP = --disable-xsmp-interact
# If you want to always automatically add a servername, also in the terminal.
#CONF_OPT_AUTOSERVE = --enable-autoservername
# COMPILER - Name of the compiler {{{1
# The default from configure will mostly be fine, no need to change this, just
# an example. If a compiler is defined here, configure will use it rather than
@@ -1866,7 +1869,7 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
$(CONF_OPT_DARWIN) $(CONF_OPT_FAIL) \
$(CONF_OPT_AUTOSERVE) $(CONF_OPT_DARWIN) $(CONF_OPT_FAIL) \
$(CONF_OPT_PERL) $(CONF_OPT_PYTHON) $(CONF_OPT_PYTHON3) \
$(CONF_OPT_TCL) $(CONF_OPT_RUBY) $(CONF_OPT_NLS) \
$(CONF_OPT_CSCOPE) $(CONF_OPT_MULTIBYTE) $(CONF_OPT_INPUT) \

22
src/auto/configure vendored
View File

@@ -817,6 +817,7 @@ enable_workshop
enable_netbeans
enable_channel
enable_terminal
enable_autoservername
enable_multibyte
enable_hangulinput
enable_xim
@@ -1495,6 +1496,7 @@ Optional Features:
--disable-netbeans Disable NetBeans integration support.
--disable-channel Disable process communication support.
--enable-terminal Enable terminal emulation support.
--enable-autoservername Automatically define servername at vim startup.
--enable-multibyte Include multibyte editing support.
--enable-hangulinput Include Hangul input support.
--enable-xim Include XIM input support.
@@ -7516,6 +7518,22 @@ if test "$enable_terminal" = "yes"; then
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
$as_echo_n "checking --enable-autoservername argument... " >&6; }
# Check whether --enable-autoservername was given.
if test "${enable_autoservername+set}" = set; then :
enableval=$enable_autoservername;
else
enable_autoservername="no"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
$as_echo "$enable_autoservername" >&6; }
if test "$enable_autoservername" = "yes"; then
$as_echo "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
$as_echo_n "checking --enable-multibyte argument... " >&6; }
# Check whether --enable-multibyte was given.
@@ -12072,13 +12090,13 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
fi
for ac_func in fchdir fchown fsync getcwd getpseudotty \
for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
usleep utime utimes mblen
usleep utime utimes mblen ftruncate
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

View File

@@ -2898,8 +2898,6 @@ channel_close(channel_T *channel, int invoke_close_cb)
channel->ch_close_cb = NULL;
channel->ch_close_partial = NULL;
--channel->ch_refcount;
if (channel_need_redraw)
{
channel_need_redraw = FALSE;
@@ -2910,6 +2908,8 @@ channel_close(channel_T *channel, int invoke_close_cb)
/* any remaining messages are useless now */
for (part = PART_SOCK; part < PART_IN; ++part)
drop_messages(channel, part);
--channel->ch_refcount;
}
}

View File

@@ -156,9 +156,11 @@
/* Define if you the function: */
#undef HAVE_FCHDIR
#undef HAVE_FCHOWN
#undef HAVE_FCHMOD
#undef HAVE_FLOAT_FUNCS
#undef HAVE_FSEEKO
#undef HAVE_FSYNC
#undef HAVE_FLOAT_FUNCS
#undef HAVE_FTRUNCATE
#undef HAVE_GETCWD
#undef HAVE_GETPGID
#undef HAVE_GETPSEUDOTTY
@@ -384,6 +386,9 @@
/* Define if you want to include multibyte support. */
#undef FEAT_MBYTE
/* Define if you want to always define a server name at vim startup. */
#undef FEAT_AUTOSERVERNAME
/* Define if you want to include fontset support. */
#undef FEAT_XFONTSET

View File

@@ -2066,6 +2066,15 @@ if test "$enable_terminal" = "yes"; then
AC_SUBST(TERM_OBJ)
fi
AC_MSG_CHECKING(--enable-autoservername argument)
AC_ARG_ENABLE(autoservername,
[ --enable-autoservername Automatically define servername at vim startup.], ,
[enable_autoservername="no"])
AC_MSG_RESULT($enable_autoservername)
if test "$enable_autoservername" = "yes"; then
AC_DEFINE(FEAT_AUTOSERVERNAME)
fi
AC_MSG_CHECKING(--enable-multibyte argument)
AC_ARG_ENABLE(multibyte,
[ --enable-multibyte Include multibyte editing support.], ,
@@ -3646,13 +3655,13 @@ 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(fchdir fchown fsync getcwd getpseudotty \
AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
usleep utime utimes mblen)
usleep utime utimes mblen ftruncate)
AC_FUNC_FSEEKO
dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when

View File

@@ -5580,6 +5580,9 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_AUTOCMD
"autocmd",
#endif
#ifdef FEAT_AUTOSERVERNAME
"autoservername",
#endif
#ifdef FEAT_BEVAL
"balloon_eval",
# ifndef FEAT_GUI_W32 /* other GUIs always have multiline balloons */

View File

@@ -2007,7 +2007,8 @@ write_viminfo(char_u *file, int forceit)
/*
* If we can't create in the same directory, try creating a
* "normal" temp file.
* "normal" temp file. This is just an attempt, renaming the temp
* file might fail as well.
*/
if (fp_out == NULL)
{
@@ -2018,11 +2019,29 @@ write_viminfo(char_u *file, int forceit)
#if defined(UNIX) && defined(HAVE_FCHOWN)
/*
* Make sure the owner can read/write it. This only works for
* root.
* Make sure the original owner can read/write the tempfile and
* otherwise preserve permissions, making sure the group matches.
*/
if (fp_out != NULL)
ignored = fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
{
stat_T tmp_st;
if (mch_stat((char *)tempname, &tmp_st) >= 0)
{
if (st_old.st_uid != tmp_st.st_uid)
/* Changing the owner might fail, in which case the
* file will now owned by the current user, oh well. */
ignored = fchown(fileno(fp_out), st_old.st_uid, -1);
if (st_old.st_gid != tmp_st.st_gid
&& fchown(fileno(fp_out), -1, st_old.st_gid) == -1)
/* can't set the group to what it should be, remove
* group permissions */
(void)mch_setperm(tempname, 0600);
}
else
/* can't stat the file, set conservative permissions */
(void)mch_setperm(tempname, 0600);
}
#endif
}
}
@@ -7536,7 +7555,7 @@ ex_sign(exarg_T *eap)
int idx;
sign_T *sp;
sign_T *sp_prev;
buf_T *buf;
buf_T *buf = NULL;
/* Parse the subcommand. */
p = skiptowhite(arg);

View File

@@ -11695,9 +11695,11 @@ put_view(
}
/*
* Local directory.
* Local directory, if the current flag is not view options or the "curdir"
* option is included.
*/
if (wp->w_localdir != NULL)
if (wp->w_localdir != NULL
&& (flagp != &vop_flags || (*flagp & SSOP_CURDIR)))
{
if (fputs("lcd ", fd) < 0
|| ses_put_fname(fd, wp->w_localdir, flagp) == FAIL

View File

@@ -1167,6 +1167,20 @@
# define FEAT_CLIENTSERVER
#endif
/*
* +autoservername Automatically generate a servername for clientserver
* when --servername is not passed on the command line.
*/
#if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
# ifdef WIN3264
/* Always enabled on MS-Windows. */
# define FEAT_AUTOSERVERNAME
# else
/* Enable here if you don't use configure. */
/* # define FEAT_AUTOSERVERNAME */
# endif
#endif
/*
* +termresponse send t_RV to obtain terminal response. Used for xterm
* to check if mouse dragging can be used and if term

View File

@@ -3863,6 +3863,7 @@ buf_write(
char_u *rootname;
#if defined(UNIX)
int did_set_shortname;
mode_t umask_save;
#endif
copybuf = alloc(BUFSIZE + 1);
@@ -3994,10 +3995,17 @@ buf_write(
/* remove old backup, if present */
mch_remove(backup);
/* Open with O_EXCL to avoid the file being created while
* we were sleeping (symlink hacker attack?) */
* we were sleeping (symlink hacker attack?). Reset umask
* if possible to avoid mch_setperm() below. */
#ifdef UNIX
umask_save = umask(0);
#endif
bfd = mch_open((char *)backup,
O_WRONLY|O_CREAT|O_EXTRA|O_EXCL|O_NOFOLLOW,
perm & 0777);
#ifdef UNIX
(void)umask(umask_save);
#endif
if (bfd < 0)
{
vim_free(backup);
@@ -4005,11 +4013,12 @@ buf_write(
}
else
{
/* set file protection same as original file, but
* strip s-bit */
/* Set file protection same as original file, but
* strip s-bit. Only needed if umask() wasn't used
* above. */
#ifndef UNIX
(void)mch_setperm(backup, perm & 0777);
#ifdef UNIX
#else
/*
* Try to set the group of the backup same as the
* original file. If this fails, set the protection
@@ -4377,6 +4386,11 @@ buf_write(
}
else
{
#ifdef HAVE_FTRUNCATE
# define TRUNC_ON_OPEN 0
#else
# define TRUNC_ON_OPEN O_TRUNC
#endif
/*
* Open the file "wfname" for writing.
* We may try to open the file twice: If we can't write to the file
@@ -4389,7 +4403,7 @@ buf_write(
*/
while ((fd = mch_open((char *)wfname, O_WRONLY | O_EXTRA | (append
? (forceit ? (O_APPEND | O_CREAT) : O_APPEND)
: (O_CREAT | O_TRUNC))
: (O_CREAT | TRUNC_ON_OPEN))
, perm < 0 ? 0666 : (perm & 0777))) < 0)
{
/*
@@ -4482,6 +4496,30 @@ restore_backup:
}
write_info.bw_fd = fd;
#if defined(UNIX)
{
stat_T st;
/* Double check we are writing the intended file before making
* any changes. */
if (overwriting
&& (!dobackup || backup_copy)
&& fname == wfname
&& perm >= 0
&& mch_fstat(fd, &st) == 0
&& st.st_ino != st_old.st_ino)
{
close(fd);
errmsg = (char_u *)_("E949: File changed while writing");
goto fail;
}
}
#endif
#ifdef HAVE_FTRUNCATE
if (!append)
ftruncate(fd, (off_t)0);
#endif
#if defined(WIN3264)
if (backup != NULL && overwriting && !append)
{
@@ -4752,15 +4790,17 @@ restore_backup:
# ifdef HAVE_FCHOWN
stat_T st;
/* don't change the owner when it's already OK, some systems remove
* permission or ACL stuff */
/* Don't change the owner when it's already OK, some systems remove
* permission or ACL stuff. */
if (mch_stat((char *)wfname, &st) < 0
|| st.st_uid != st_old.st_uid
|| st.st_gid != st_old.st_gid)
{
ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
if (perm >= 0) /* set permission again, may have changed */
(void)mch_setperm(wfname, perm);
/* changing owner might not be possible */
ignored = fchown(fd, st_old.st_uid, -1);
/* if changing group fails clear the group permissions */
if (fchown(fd, -1, st_old.st_gid) == -1 && perm > 0)
perm &= ~070;
}
# endif
buf_setino(buf);
@@ -4770,18 +4810,26 @@ restore_backup:
buf_setino(buf);
#endif
#ifdef UNIX
if (made_writable)
perm &= ~0200; /* reset 'w' bit for security reasons */
#endif
#ifdef HAVE_FCHMOD
/* set permission of new file same as old file */
if (perm >= 0)
(void)mch_fsetperm(fd, perm);
#endif
if (close(fd) != 0)
{
errmsg = (char_u *)_("E512: Close failed");
end = 0;
}
#ifdef UNIX
if (made_writable)
perm &= ~0200; /* reset 'w' bit for security reasons */
#endif
if (perm >= 0) /* set perm. of new file same as old file */
#ifndef HAVE_FCHMOD
/* set permission of new file same as old file */
if (perm >= 0)
(void)mch_setperm(wfname, perm);
#endif
#ifdef HAVE_ACL
/*
* Probably need to set the ACL before changing the user (can't set the

View File

@@ -1118,6 +1118,9 @@ gui_update_cursor(
gui_mch_set_blinking(shape->blinkwait,
shape->blinkon,
shape->blinkoff);
if (shape->blinkwait == 0 || shape->blinkon == 0
|| shape->blinkoff == 0)
gui_mch_stop_blink();
#ifdef FEAT_TERMINAL
if (shape_bg != INVALCOLOR)
{
@@ -3118,15 +3121,18 @@ button_set:
{
case NORMAL_BUSY:
case OP_PENDING:
# ifdef FEAT_TERMINAL
case TERMINAL:
# endif
case NORMAL: checkfor = MOUSE_NORMAL; break;
case VISUAL: checkfor = MOUSE_VISUAL; break;
case SELECTMODE: checkfor = MOUSE_VISUAL; break;
case REPLACE:
case REPLACE+LANGMAP:
#ifdef FEAT_VREPLACE
# ifdef FEAT_VREPLACE
case VREPLACE:
case VREPLACE+LANGMAP:
#endif
# endif
case INSERT:
case INSERT+LANGMAP: checkfor = MOUSE_INSERT; break;
case ASKMORE:

View File

@@ -3673,12 +3673,18 @@ prepare_server(mparm_T *parmp)
/*
* Register for remote command execution with :serversend and --remote
* unless there was a -X or a --servername '' on the command line.
* Only register nongui-vim's with an explicit --servername argument.
* Only register nongui-vim's with an explicit --servername argument,
* or when compiling with autoservername.
* When running as root --servername is also required.
*/
if (X_DISPLAY != NULL && parmp->servername != NULL && (
# ifdef FEAT_GUI
(gui.in_use
# if defined(FEAT_AUTOSERVERNAME) || defined(FEAT_GUI)
(
# if defined(FEAT_AUTOSERVERNAME)
1
# else
gui.in_use
# endif
# ifdef UNIX
&& getuid() != ROOT_UID
# endif

View File

@@ -2926,7 +2926,8 @@ static struct vimoption options[] =
{"viewoptions", "vop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
#ifdef FEAT_SESSION
(char_u *)&p_vop, PV_NONE,
{(char_u *)"folds,options,cursor", (char_u *)0L}
{(char_u *)"folds,options,cursor,curdir",
(char_u *)0L}
#else
(char_u *)NULL, PV_NONE,
{(char_u *)0L, (char_u *)0L}

View File

@@ -2725,9 +2725,8 @@ mch_getperm(char_u *name)
}
/*
* set file permission for 'name' to 'perm'
*
* return FAIL for failure, OK otherwise
* Set file permission for "name" to "perm".
* Return FAIL for failure, OK otherwise.
*/
int
mch_setperm(char_u *name, long perm)
@@ -2741,6 +2740,18 @@ mch_setperm(char_u *name, long perm)
(mode_t)perm) == 0 ? OK : FAIL);
}
#if defined(HAVE_FCHMOD) || defined(PROTO)
/*
* Set file permission for open file "fd" to "perm".
* Return FAIL for failure, OK otherwise.
*/
int
mch_fsetperm(int fd, long perm)
{
return (fchmod(fd, (mode_t)perm) == 0 ? OK : FAIL);
}
#endif
#if defined(HAVE_ACL) || defined(PROTO)
# ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>

View File

@@ -36,6 +36,7 @@ int mch_isFullName(char_u *fname);
void fname_case(char_u *name, int len);
long mch_getperm(char_u *name);
int mch_setperm(char_u *name, long perm);
int mch_fsetperm(int fd, long perm);
void mch_copy_sec(char_u *from_file, char_u *to_file);
vim_acl_T mch_get_acl(char_u *fname);
void mch_set_acl(char_u *fname, vim_acl_T aclent);

View File

@@ -2280,7 +2280,7 @@ findmatchlimit(
{
/*
* A comment may contain / * or / /, it may also start or end
* with / * /. Ignore a / * after / /.
* with / * /. Ignore a / * after / / and after *.
*/
if (pos.col == 0)
continue;
@@ -2306,6 +2306,7 @@ findmatchlimit(
}
else if ( linep[pos.col - 1] == '/'
&& linep[pos.col] == '*'
&& (pos.col == 1 || linep[pos.col - 2] != '*')
&& (int)pos.col < comment_col)
{
count++;

View File

@@ -40,7 +40,6 @@
* TODO:
* - in GUI vertical split causes problems. Cursor is flickering. (Hirohito
* Higashi, 2017 Sep 19)
* - double click in Window toolbar starts Visual mode (but not always?).
* - Shift-Tab does not work.
* - after resizing windows overlap. (Boris Staletic, #2164)
* - Redirecting output does not work on MS-Windows, Test_terminal_redir_file()
@@ -732,7 +731,7 @@ term_convert_key(term_T *term, int c, char *buf)
VTerm *vterm = term->tl_vterm;
VTermKey key = VTERM_KEY_NONE;
VTermModifier mod = VTERM_MOD_NONE;
int mouse = FALSE;
int other = FALSE;
switch (c)
{
@@ -809,22 +808,22 @@ term_convert_key(term_T *term, int c, char *buf)
key = VTERM_KEY_UP; break;
case TAB: key = VTERM_KEY_TAB; break;
case K_MOUSEUP: mouse = term_send_mouse(vterm, 5, 1); break;
case K_MOUSEDOWN: mouse = term_send_mouse(vterm, 4, 1); break;
case K_MOUSEUP: other = term_send_mouse(vterm, 5, 1); break;
case K_MOUSEDOWN: other = term_send_mouse(vterm, 4, 1); break;
case K_MOUSELEFT: /* TODO */ return 0;
case K_MOUSERIGHT: /* TODO */ return 0;
case K_LEFTMOUSE:
case K_LEFTMOUSE_NM: mouse = term_send_mouse(vterm, 1, 1); break;
case K_LEFTDRAG: mouse = term_send_mouse(vterm, 1, 1); break;
case K_LEFTMOUSE_NM: other = term_send_mouse(vterm, 1, 1); break;
case K_LEFTDRAG: other = term_send_mouse(vterm, 1, 1); break;
case K_LEFTRELEASE:
case K_LEFTRELEASE_NM: mouse = term_send_mouse(vterm, 1, 0); break;
case K_MIDDLEMOUSE: mouse = term_send_mouse(vterm, 2, 1); break;
case K_MIDDLEDRAG: mouse = term_send_mouse(vterm, 2, 1); break;
case K_MIDDLERELEASE: mouse = term_send_mouse(vterm, 2, 0); break;
case K_RIGHTMOUSE: mouse = term_send_mouse(vterm, 3, 1); break;
case K_RIGHTDRAG: mouse = term_send_mouse(vterm, 3, 1); break;
case K_RIGHTRELEASE: mouse = term_send_mouse(vterm, 3, 0); break;
case K_LEFTRELEASE_NM: other = term_send_mouse(vterm, 1, 0); break;
case K_MIDDLEMOUSE: other = term_send_mouse(vterm, 2, 1); break;
case K_MIDDLEDRAG: other = term_send_mouse(vterm, 2, 1); break;
case K_MIDDLERELEASE: other = term_send_mouse(vterm, 2, 0); break;
case K_RIGHTMOUSE: other = term_send_mouse(vterm, 3, 1); break;
case K_RIGHTDRAG: other = term_send_mouse(vterm, 3, 1); break;
case K_RIGHTRELEASE: other = term_send_mouse(vterm, 3, 0); break;
case K_X1MOUSE: /* TODO */ return 0;
case K_X1DRAG: /* TODO */ return 0;
case K_X1RELEASE: /* TODO */ return 0;
@@ -858,8 +857,12 @@ term_convert_key(term_T *term, int c, char *buf)
#ifdef FEAT_AUTOCMD
case K_CURSORHOLD: return 0;
#endif
case K_PS: vterm_keyboard_start_paste(vterm); return 0;
case K_PE: vterm_keyboard_end_paste(vterm); return 0;
case K_PS: vterm_keyboard_start_paste(vterm);
other = TRUE;
break;
case K_PE: vterm_keyboard_end_paste(vterm);
other = TRUE;
break;
}
/*
@@ -871,7 +874,7 @@ term_convert_key(term_T *term, int c, char *buf)
if (key != VTERM_KEY_NONE)
/* Special key, let vterm convert it. */
vterm_keyboard_key(vterm, key, mod);
else if (!mouse)
else if (!other)
/* Normal character, let vterm convert it. */
vterm_keyboard_unichar(vterm, c, mod);

BIN
src/testdir/samples/test000 Normal file

Binary file not shown.

View File

@@ -2338,6 +2338,16 @@ CCC
CCC
#define CNT \
1 + \
2 + \
4
/* end of define */
STARTTEST
:set cin cino&
/a = second
ox
ENDTEST
{
a = second/*bug*/*line;

View File

@@ -2094,3 +2094,9 @@ JSEND
4
/* end of define */
{
a = second/*bug*/*line;
x
}

View File

@@ -4,22 +4,82 @@
" Also tests :earlier and :later.
func Test_undotree()
exe "normal Aabc\<Esc>"
new
normal! Aabc
set ul=100
exe "normal Adef\<Esc>"
set ul=100
undo
let d = undotree()
call assert_true(d.seq_last > 0)
call assert_true(d.seq_cur > 0)
call assert_true(d.seq_cur < d.seq_last)
call assert_true(len(d.entries) > 0)
" TODO: check more members of d
call assert_equal(1, d.seq_last)
call assert_equal(1, d.seq_cur)
call assert_equal(0, d.save_last)
call assert_equal(0, d.save_cur)
call assert_equal(1, len(d.entries))
call assert_equal(1, d.entries[0].newhead)
call assert_equal(1, d.entries[0].seq)
call assert_true(d.entries[0].time <= d.time_cur)
normal! Adef
set ul=100
let d = undotree()
call assert_equal(2, d.seq_last)
call assert_equal(2, d.seq_cur)
call assert_equal(0, d.save_last)
call assert_equal(0, d.save_cur)
call assert_equal(2, len(d.entries))
call assert_equal(1, d.entries[0].seq)
call assert_equal(1, d.entries[1].newhead)
call assert_equal(2, d.entries[1].seq)
call assert_true(d.entries[1].time <= d.time_cur)
undo
set ul=100
let d = undotree()
call assert_equal(2, d.seq_last)
call assert_equal(1, d.seq_cur)
call assert_equal(0, d.save_last)
call assert_equal(0, d.save_cur)
call assert_equal(2, len(d.entries))
call assert_equal(1, d.entries[0].seq)
call assert_equal(1, d.entries[1].curhead)
call assert_equal(1, d.entries[1].newhead)
call assert_equal(2, d.entries[1].seq)
call assert_true(d.entries[1].time == d.time_cur)
normal! Aghi
set ul=100
let d = undotree()
call assert_equal(3, d.seq_last)
call assert_equal(3, d.seq_cur)
call assert_equal(0, d.save_last)
call assert_equal(0, d.save_cur)
call assert_equal(2, len(d.entries))
call assert_equal(1, d.entries[0].seq)
call assert_equal(2, d.entries[1].alt[0].seq)
call assert_equal(1, d.entries[1].newhead)
call assert_equal(3, d.entries[1].seq)
call assert_true(d.entries[1].time <= d.time_cur)
undo
set ul=100
let d = undotree()
call assert_equal(3, d.seq_last)
call assert_equal(1, d.seq_cur)
call assert_equal(0, d.save_last)
call assert_equal(0, d.save_cur)
call assert_equal(2, len(d.entries))
call assert_equal(1, d.entries[0].seq)
call assert_equal(2, d.entries[1].alt[0].seq)
call assert_equal(1, d.entries[1].curhead)
call assert_equal(1, d.entries[1].newhead)
call assert_equal(3, d.entries[1].seq)
call assert_true(d.entries[1].time == d.time_cur)
w! Xtest
call assert_equal(d.save_last + 1, undotree().save_last)
let d = undotree()
call assert_equal(1, d.save_cur)
call assert_equal(1, d.save_last)
call delete('Xtest')
bwipe Xtest
bwipe! Xtest
endfunc
func FillBuffer()

View File

@@ -2653,6 +2653,21 @@ retnomove:
return IN_STATUS_LINE;
if (on_sep_line)
return IN_SEP_LINE;
#ifdef FEAT_MENU
if (in_winbar)
{
/* A quick second click may arrive as a double-click, but we use it
* as a second click in the WinBar. */
if ((mod_mask & MOD_MASK_MULTI_CLICK) && !(flags & MOUSE_RELEASED))
{
wp = mouse_find_win(&row, &col);
if (wp == NULL)
return IN_UNKNOWN;
winbar_click(wp, col);
}
return IN_OTHER_WIN | MOUSE_WINBAR;
}
#endif
if (flags & MOUSE_MAY_STOP_VIS)
{
end_visual_mode();

View File

@@ -2863,9 +2863,14 @@ u_undoredo(int undo)
/* Remember where we are for "g-" and ":earlier 10s". */
curbuf->b_u_seq_cur = curhead->uh_seq;
if (undo)
{
/* We are below the previous undo. However, to make ":earlier 1s"
* work we compute this as being just above the just undone change. */
--curbuf->b_u_seq_cur;
if (curhead->uh_next.ptr != NULL)
curbuf->b_u_seq_cur = curhead->uh_next.ptr->uh_seq;
else
curbuf->b_u_seq_cur = 0;
}
/* Remember where we are for ":earlier 1f" and ":later 1f". */
if (curhead->uh_save_nr != 0)

View File

@@ -83,6 +83,11 @@ static char *(features[]) =
#else
"-autocmd",
#endif
#ifdef FEAT_AUTOSERVERNAME
"+autoservername",
#else
"-autoservername",
#endif
#ifdef FEAT_BEVAL
"+balloon_eval",
#else
@@ -761,6 +766,38 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1301,
/**/
1300,
/**/
1299,
/**/
1298,
/**/
1297,
/**/
1296,
/**/
1295,
/**/
1294,
/**/
1293,
/**/
1292,
/**/
1291,
/**/
1290,
/**/
1289,
/**/
1288,
/**/
1287,
/**/
1286,
/**/
1285,
/**/