Compare commits

...

11 Commits

Author SHA1 Message Date
Bram Moolenaar
158a1b0748 updated for version 7.4.379
Problem:    Accessing freed memory after using setqflist(list, 'r'). (Lcd)
Solution:   Reset qf_index.
2014-07-23 16:33:07 +02:00
Bram Moolenaar
fb60409a3f updated for version 7.4.378
Problem:    Title of quickfist list is not kept for setqflist(list, 'r').
Solution:   Keep the title.  Add a test. (Lcd)
2014-07-23 15:55:00 +02:00
Bram Moolenaar
54368f2742 updated for version 7.4.377
Problem:    When 'equalalways' is set a split may report "no room" even though
            there is plenty of room.
Solution:   Compute the available room properly. (Yukihiro Nakadaira)
2014-07-23 15:21:20 +02:00
Bram Moolenaar
674fffe855 updated for version 7.4.376
Problem:    Popup menu flickers too much.
Solution:   Remove the forced redraw. (Hirohito Higashi)
2014-07-23 13:50:46 +02:00
Bram Moolenaar
a1fae80371 updated for version 7.4.375
Problem:    Test 63 fails when run with GUI-only Vim.
Solution:   Add guibg attributes. (suggested by Mike Soyka)
2014-07-23 13:16:30 +02:00
Bram Moolenaar
4f88062c55 updated for version 7.4.374
Problem:    Character after "fb" command not mapped if it might be a composing
            character.
Solution:   Don't disable mapping when looking for a composing character.
            (Jacob Niehus)
2014-07-23 12:31:20 +02:00
Bram Moolenaar
07d87790f1 Update runtime files. Make matchparen plugin backwards compatible.
Add json filetype.
2014-07-19 14:04:47 +02:00
Bram Moolenaar
a04854932e updated for version 7.4.373
Problem:    Compiler warning for unused argument and unused variable.
Solution:   Add UNUSED.  Move variable inside #ifdef.
2014-07-16 23:39:54 +02:00
Bram Moolenaar
1f538355db updated for version 7.4.372
Problem:    When 'winminheight' is zero there might not be one line for the
            current window.
Solution:   Change the size computations. (Yukihiro Nakadaira)
2014-07-16 18:19:27 +02:00
Bram Moolenaar
5524aebf16 updated for version 7.4.371
Problem:    When 'linebreak' is set control characters are not correctly
            displayed. (Kimmy Lindvall)
Solution:   Set n_extra. (Christian Brabandt)
2014-07-16 17:29:51 +02:00
Bram Moolenaar
b5647f71c2 updated for version 7.4.370
Problem:    Linebreak test fails when encoding is not utf-8. (Danek Duvall)
Solution:   Split the test in a single byte one and a utf-8 one. (Christian
            Brabandt)
2014-07-16 17:01:53 +02:00
32 changed files with 354 additions and 102 deletions

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.4. Last change: 2014 May 02
*editing.txt* For Vim version 7.4. Last change: 2014 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1362,6 +1362,11 @@ cannot be read without the right key.
{only available when compiled with the |+cryptv| feature} *E833*
The text in the swap file and the undo file is also encrypted. *E843*
However, this is done block-by-block and may reduce the time needed to crack a
password. You can disable the swap file, but then a crash will cause you to
lose your work. The undo file can be disabled without much disadvantage. >
:set noundofile
:noswapfile edit secrets
Note: The text in memory is not encrypted. A system administrator may be able
to see your text while you are editing it. When filtering text with

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2014 Jul 06
*eval.txt* For Vim version 7.4. Last change: 2014 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6512,7 +6512,7 @@ winsaveview() Returns a |Dictionary| that contains information to restore
buffer and you want to go back to the original view.
This does not save fold information. Use the 'foldenable'
option to temporarily switch off folding, so that folds are
not opened when moving around.
not opened when moving around. This may have side effects.
The return value includes:
lnum cursor line number
col cursor column (Note: the first column

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2014 Jul 10
*todo.txt* For Vim version 7.4. Last change: 2014 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,7 +34,7 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Forfeit test_listlbr when encoding is not utf8? (Danek Duvall)
Completion menu: remove redraw (Hirohito Higashi)
Regexp problems:
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
@@ -49,12 +49,41 @@ Regexp problems:
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
Patch to set y_width when getting the register from the clipboard.
(Yukihiro Nakadaira, 2014 Jul 10)
Crash when splitting the window when the size is tiny.
(Yukihiro Nakadaira, 2014 Jul 15-16)
Another problem with splitting window. (Yukihiro Nakadaira, 2014 Jul 17)
Patch Jul 17.
Using freed memory when jumping from a quickfix list. (lcd47, 2014 Jul 17)
Patch to fix valgrind error. (Dominique Pelle, 2014 Jul 9)
Vroom filetype support. (David Barnett, 2014 Jul 10)
u_undo error. Reproduce with description from Ayberk Ozgur, 2014 Jul 17.
Updated Django files. (Dave Hodder, 2014 Jul 13)
Title of quickfist list is not kept for setqflist(list 'r').
(Lcd, 2014 Jul 17) With test Jul 18.
Patch to fix noremap flags not cleared after typing Esc. (Jacob Niehus, 2014
Jul 9)
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
DiffChange highlighting doesn't combine with 'cursurline'. (Benjamin Fritz)
Patch by Christian (2014 Jul 12)
BufWinLeave autocommand executed in the wrong buffer? (Davit Samvelyan, 2014
Jul 14)
When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard
after the last delete? (Praful, 2014 May 28)
Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25.
Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31)
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
@@ -93,6 +122,8 @@ Phpcomplete.vim update. (Complex, 2014 Jan 15)
PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
Patch for matchparen. (James McCoy, 2014 Jul 11)
Spell files use a latin single quote. Unicode also has another single quote:
0x2019. (Ron Aaron, 2014 Apr 4)
New OpenOffice spell files support this with ICONV. But they are not
@@ -128,10 +159,6 @@ from?
Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman,
2014 Jun 8)
When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard
after the last delete? (Praful, 2014 May 28)
Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25.
Include a plugin manager with Vim? Neobundle seems to be the best currently.
Long message about this from ZyX, 2014 Mar 23. And following replies.
Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
@@ -493,6 +520,9 @@ Aug 16)
When there are no command line arguments ":next" and ":argu" give E163, which
is confusing. Should say "the argument list is empty".
xterm supports escape sequences to mark a paste operation. Need to be
enabled. (Bruno Sutic, 2014 Jul 11) How to know the terminal supports this?
URXVT:
- will get stuck if byte sequence does not contain the expected semicolon.
- Use urxvt mouse support also in xterm. Explanations:

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Jul 09
" Last Change: 2014 Jul 16
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -989,7 +989,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
au BufNewFile,BufRead *.jj,*.jjt setf javacc
" JavaScript, ECMAScript
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json setf javascript
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
" Java Server Pages
au BufNewFile,BufRead *.jsp setf jsp
@@ -1007,6 +1007,9 @@ au BufNewFile,BufRead *.jgr setf jgraph
" Jovial
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json setf json
" Kixtart
au BufNewFile,BufRead *.kix setf kix

17
runtime/ftplugin/json.vim Normal file
View File

@@ -0,0 +1,17 @@
" Vim filetype plugin
" Language: JSON
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 16
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = 'setlocal formatoptions< comments< commentstring<'
setlocal formatoptions-=t
" JSON has no comments.
setlocal comments=
setlocal commentstring=

13
runtime/indent/json.vim Normal file
View File

@@ -0,0 +1,13 @@
" Vim indent file
" Language: JSON
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 16
if exists('b:did_indent')
finish
endif
" JSON is a subset of JavaScript. JavaScript indenting should work fine.
runtime! indent/javascript.vim
let b:did_indent = 1

View File

@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Jul 09
" Last Change: 2014 Jul 19
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -88,7 +88,13 @@ function! s:Highlight_Matching_Pair()
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let save_cursor = getcurpos()
let has_getcurpos = exists("*getcurpos")
if has_getcurpos
" getcurpos() is more efficient but doesn't exist before 7.4.313.
let save_cursor = getcurpos()
else
let save_cursor = winsaveview()
endif
call cursor(c_lnum, c_col - before)
endif
@@ -148,7 +154,11 @@ function! s:Highlight_Matching_Pair()
endtry
if before > 0
call setpos('.', save_cursor)
if has_getcurpos
call setpos('.', save_cursor)
else
call winrestview(save_cursor)
endif
endif
" If a match is found setup match highlighting.

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: 2014 Jan 20
" Last Change: 2014 Jul 11
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
" Standard syntax initialization
@@ -19,7 +19,7 @@ syn case ignore
" Define some common expressions we can use later on
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(lucid|precise|quantal|saucy|trusty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"

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: 2013 Oct 28
" Last Change: 2014 May 01
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
" Standard syntax initialization
@@ -13,6 +13,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Should match case except for the keys of each field
syn case match
@@ -23,8 +26,17 @@ syn match debcontrolElse "^.*$"
syn match debControlComma ", *"
syn match debControlSpace " "
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\|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
syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\|64\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\%(spe\)\=\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|x32\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)"
exe 'syn match debcontrolArchitecture contained "\%(all\|'. s:kernels .'-any\|\%(any-\)\='. s:archs .'\|'. s:pairs .'\|any\)"'
unlet s:kernels s:archs s:pairs
syn match 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\)"
@@ -108,4 +120,7 @@ endif
let b:current_syntax = "debcontrol"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8 sw=2

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: 2014 Jan 20
" Last Change: 2014 Jul 11
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
" Standard syntax initialization
@@ -23,7 +23,7 @@ syn match debsourcesComment /#.*/ contains=@Spell
" Match uri's
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|saucy\|trusty\)\([-[:alnum:]_./]*\)+
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|jessie\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|trusty\|utopic\)\([-[:alnum:]_./]*\)+
" Associate our matches and regions with pretty colours
hi def link debsourcesLine Error

16
runtime/syntax/json.vim Normal file
View File

@@ -0,0 +1,16 @@
" Vim syntax file
" Language: JSON
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 16
" For version 5.x: Clear all syntax items.
" For version 6.x and later: Quit when a syntax file was already loaded.
if exists('b:current_syntax')
finish
endif
" Use JavaScript syntax. JSON is a subset of JavaScript.
runtime! syntax/javascript.vim
unlet b:current_syntax
let b:current_syntax = 'json'

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Neil Schemenauer <nas@python.ca>
" Last Change: 2013 Feb 26
" Last Change: 2014 Jul 16
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
" Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
@@ -113,7 +113,7 @@ syn match pythonEscape "\\\o\{1,3}" contained
syn match pythonEscape "\\x\x\{2}" contained
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
syn match pythonEscape "\\N{.\{-}}" contained
syn match pythonEscape "\\$"
if exists("python_highlight_all")

View File

@@ -1024,7 +1024,7 @@ vim_isprintc_strict(c)
*/
int
lbr_chartabsize(line, s, col)
char_u *line; /* start of the line */
char_u *line UNUSED; /* start of the line */
unsigned char *s;
colnr_T col;
{
@@ -1069,7 +1069,7 @@ lbr_chartabsize_adv(line, s, col)
int
win_lbr_chartabsize(wp, line, s, col, headp)
win_T *wp;
char_u *line; /* start of the line */
char_u *line UNUSED; /* start of the line */
char_u *s;
colnr_T col;
int *headp UNUSED;

View File

@@ -4593,9 +4593,9 @@ ins_compl_delete()
i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0);
backspace_until_column(i);
/* Not sure what is still valid, better redraw everything. */
/* TODO: is this sufficient for redrawing? Redrawing everything causes
* flicker, thus we can't do that. */
changed_cline_bef_curs();
redraw_curbuf_later(NOT_VALID);
}
/* Insert the new text being completed. */

View File

@@ -1076,7 +1076,10 @@ getcount:
#ifdef FEAT_MBYTE
/* When getting a text character and the next character is a
* multi-byte character, it could be a composing character.
* However, don't wait for it to arrive. */
* However, don't wait for it to arrive. Also, do enable mapping,
* because if it's put back with vungetc() it's too late to apply
* mapping. */
--no_mapping;
while (enc_utf8 && lang && (c = vpeekc()) > 0
&& (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1))
{
@@ -1091,6 +1094,7 @@ getcount:
else
ca.ncharC2 = c;
}
++no_mapping;
#endif
}
--no_mapping;

View File

@@ -107,6 +107,7 @@ struct efm_S
};
static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title));
static void qf_store_title __ARGS((qf_info_T *qi, char_u *title));
static void qf_new_list __ARGS((qf_info_T *qi, char_u *qf_title));
static void ll_free_all __ARGS((qf_info_T **pqi));
static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
@@ -126,7 +127,7 @@ static int is_qf_win __ARGS((win_T *win, qf_info_T *qi));
static win_T *qf_find_win __ARGS((qf_info_T *qi));
static buf_T *qf_find_buf __ARGS((qf_info_T *qi));
static void qf_update_buffer __ARGS((qf_info_T *qi));
static void qf_set_title __ARGS((qf_info_T *qi));
static void qf_set_title_var __ARGS((qf_info_T *qi));
static void qf_fill_buffer __ARGS((qf_info_T *qi));
#endif
static char_u *get_mef_name __ARGS((void));
@@ -884,6 +885,21 @@ qf_init_end:
return retval;
}
static void
qf_store_title(qi, title)
qf_info_T *qi;
char_u *title;
{
if (title != NULL)
{
char_u *p = alloc((int)STRLEN(title) + 2);
qi->qf_lists[qi->qf_curlist].qf_title = p;
if (p != NULL)
sprintf((char *)p, ":%s", (char *)title);
}
}
/*
* Prepare for adding a new quickfix list.
*/
@@ -895,7 +911,7 @@ qf_new_list(qi, qf_title)
int i;
/*
* If the current entry is not the last entry, delete entries below
* If the current entry is not the last entry, delete entries beyond
* the current entry. This makes it possible to browse in a tree-like
* way with ":grep'.
*/
@@ -916,14 +932,7 @@ qf_new_list(qi, qf_title)
else
qi->qf_curlist = qi->qf_listcount++;
vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
if (qf_title != NULL)
{
char_u *p = alloc((int)STRLEN(qf_title) + 2);
qi->qf_lists[qi->qf_curlist].qf_title = p;
if (p != NULL)
sprintf((char *)p, ":%s", (char *)qf_title);
}
qf_store_title(qi, qf_title);
}
/*
@@ -2164,6 +2173,7 @@ qf_free(qi, idx)
}
vim_free(qi->qf_lists[idx].qf_title);
qi->qf_lists[idx].qf_title = NULL;
qi->qf_lists[idx].qf_index = 0;
}
/*
@@ -2444,7 +2454,7 @@ ex_copen(eap)
qf_fill_buffer(qi);
if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
qf_set_title(qi);
qf_set_title_var(qi);
curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
curwin->w_cursor.col = 0;
@@ -2599,7 +2609,7 @@ qf_update_buffer(qi)
{
curwin_save = curwin;
curwin = win;
qf_set_title(qi);
qf_set_title_var(qi);
curwin = curwin_save;
}
@@ -2612,7 +2622,7 @@ qf_update_buffer(qi)
}
static void
qf_set_title(qi)
qf_set_title_var(qi)
qf_info_T *qi;
{
set_internal_string_var((char_u *)"w:quickfix_title",
@@ -3845,7 +3855,10 @@ set_errorlist(wp, list, action, title)
prevp->qf_next != prevp; prevp = prevp->qf_next)
;
else if (action == 'r')
{
qf_free(qi, qi->qf_curlist);
qf_store_title(qi, title);
}
for (li = list->lv_first; li != NULL; li = li->li_next)
{

View File

@@ -4646,6 +4646,8 @@ win_line(wp, lnum, startrow, endrow, nochange)
else if (c != NUL)
{
p_extra = transchar(c);
if (n_extra == 0)
n_extra = byte2cells(c) - 1;
#ifdef FEAT_RIGHTLEFT
if ((dy_flags & DY_UHEX) && wp->w_p_rl)
rl_mirror(p_extra); /* reverse "<12>" */

View File

@@ -39,6 +39,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_eval.out \
test_options.out
@@ -167,5 +169,7 @@ test107.out: test107.in
test_autoformat_join.out: test_autoformat_join.in
test_breakindent.out: test_breakindent.in
test_listlbr.out: test_listlbr.in
test_listlbr_utf8.out: test_listlbr_utf8.in
test_qf_title.out: test_qf_title.in
test_eval.out: test_eval.in
test_options.out: test_options.in

View File

@@ -38,6 +38,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_eval.out \
test_options.out

View File

@@ -58,6 +58,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_eval.out \
test_options.out

View File

@@ -41,6 +41,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test_eval.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_options.out
.SUFFIXES: .in .out

View File

@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2014 May 28
# Last change: 2014 Jul 23
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -99,6 +99,8 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_eval.out \
test_options.out

View File

@@ -36,6 +36,8 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_eval.out \
test_options.out

View File

@@ -6,9 +6,9 @@ STARTTEST
:" --- Check that "matcharg()" returns the correct group and pattern if a match
:" --- is defined.
:let @r = "*** Test 1: "
:highlight MyGroup1 ctermbg=red
:highlight MyGroup2 ctermbg=green
:highlight MyGroup3 ctermbg=blue
:highlight MyGroup1 ctermbg=red guibg=red
:highlight MyGroup2 ctermbg=green guibg=green
:highlight MyGroup3 ctermbg=blue guibg=blue
:match MyGroup1 /TODO/
:2match MyGroup2 /FIXME/
:3match MyGroup3 /XXX/

View File

@@ -1,10 +1,10 @@
Test for linebreak and list option
Test for linebreak and list option (non-utf8)
STARTTEST
:so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
:10new|:vsp|:vert resize 20
:put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
:put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
:norm! zt
:set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
:fu! ScreenChar(width)
@@ -32,22 +32,12 @@ STARTTEST
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:let g:test ="Test 3: set linebreak + set list + fancy listchars"
:exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:let g:test ="Test 4: set linebreak nolist"
:let g:test ="Test 3: set linebreak nolist"
:set nolist linebreak
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:let g:test ="Test 5: set nolinebreak list"
:set list nolinebreak
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
:let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!"
:set nolist linebreak ts=8
:let line="1\t".repeat('a', winwidth(0)-2)
:$put =line

View File

@@ -1,38 +1,26 @@
abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
abcdef hijklmn pqrstuvwxyz_1060ABCDEFGHIJKLMNOP
Test 1: set linebreak
abcdef
+hijklmn
+pqrstuvwxyz 1060ABC
+pqrstuvwxyz_1060ABC
+DEFGHIJKLMNOP
Test 2: set linebreak + set list
^Iabcdef hijklmn^I
+pqrstuvwxyz 1060ABC
+pqrstuvwxyz_1060ABC
+DEFGHIJKLMNOP
Test 3: set linebreak + set list + fancy listchars
▕———abcdef
+hijklmn▕———
+pqrstuvwxyz␣1060ABC
+DEFGHIJKLMNOPˑ¶
Test 4: set linebreak nolist
Test 3: set linebreak nolist
abcdef
+hijklmn
+pqrstuvwxyz 1060ABC
+pqrstuvwxyz_1060ABC
+DEFGHIJKLMNOP
Test 5: set nolinebreak list
▕———abcdef hijklmn▕—
+pqrstuvwxyz␣1060ABC
+DEFGHIJKLMNOPˑ¶
1 aaaaaaaaaaaaaaaaaa
Test 6: set linebreak with tab and 1 line as long as screen: should break!
Test 4: set linebreak with tab and 1 line as long as screen: should break!
1
+aaaaaaaaaaaaaaaaaa
~

View File

@@ -0,0 +1,41 @@
Test for linebreak and list option in utf-8 mode
STARTTEST
:so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
:so mbyte.vim
:if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
:10new|:vsp|:vert resize 20
:put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
:norm! zt
:set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
:fu! ScreenChar(width)
: let c=''
: for j in range(1,4)
: for i in range(1,a:width)
: let c.=nr2char(screenchar(j, i))
: endfor
: let c.="\n"
: endfor
: return c
:endfu
:fu! DoRecordScreen()
: wincmd l
: $put =printf(\"\n%s\", g:test)
: $put =g:line
: wincmd p
:endfu
:let g:test ="Test 1: set linebreak + set list + fancy listchars"
:exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:let g:test ="Test 2: set nolinebreak list"
:set list nolinebreak
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:%w! test.out
:qa!
ENDTEST
dummy text

View File

@@ -0,0 +1,14 @@
abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
Test 1: set linebreak + set list + fancy listchars
▕———abcdef
+hijklmn▕———
+pqrstuvwxyz␣1060ABC
+DEFGHIJKLMNOPˑ¶
Test 2: set nolinebreak list
▕———abcdef hijklmn▕—
+pqrstuvwxyz␣1060ABC
+DEFGHIJKLMNOPˑ¶

View File

@@ -0,0 +1,18 @@
Tests for quickfix window's title vim: set ft=vim :
STARTTEST
:so small.vim
:if !has('quickfix') | e! test.ok | wq! test.out | endif
:set efm=%E%f:%l:%c:%m
:cgetexpr ['file:1:1:message']
:let qflist=getqflist()
:call setqflist(qflist, 'r')
:copen
:let g:quickfix_title=w:quickfix_title
:wincmd p
:$put =g:quickfix_title
:/^Results/,$w test.out
:qa!
ENDTEST
Results of test_qf_title:

View File

@@ -0,0 +1,2 @@
Results of test_qf_title:
:setqflist()

View File

@@ -734,6 +734,26 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
379,
/**/
378,
/**/
377,
/**/
376,
/**/
375,
/**/
374,
/**/
373,
/**/
372,
/**/
371,
/**/
370,
/**/
369,
/**/

View File

@@ -684,10 +684,10 @@ win_split_ins(size, flags, new_wp, dir)
int available;
int oldwin_height = 0;
int layout;
frame_T *frp, *curfrp;
frame_T *frp, *curfrp, *frp2, *prevfrp;
int before;
int minwidth;
int minheight;
int wmh1;
if (flags & WSP_TOP)
oldwin = firstwin;
@@ -716,25 +716,48 @@ win_split_ins(size, flags, new_wp, dir)
#ifdef FEAT_VERTSPLIT
if (flags & WSP_VERT)
{
int wmw1;
int minwidth;
layout = FR_ROW;
/*
* Check if we are able to split the current window and compute its
* width.
*/
needed = p_wmw + 1;
/* Current window requires at least 1 space. */
wmw1 = (p_wmw == 0 ? 1 : p_wmw);
needed = wmw1 + 1;
if (flags & WSP_ROOM)
needed += p_wiw - p_wmw;
if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
needed += p_wiw - wmw1;
if (flags & (WSP_BOT | WSP_TOP))
{
minwidth = frame_minwidth(topframe, NULL);
minwidth = frame_minwidth(topframe, NOWIN);
available = topframe->fr_width;
needed += minwidth;
}
else if (p_ea)
{
minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
prevfrp = oldwin->w_frame;
for (frp = oldwin->w_frame->fr_parent; frp != NULL;
frp = frp->fr_parent)
{
if (frp->fr_layout == FR_ROW)
for (frp2 = frp->fr_child; frp2 != NULL;
frp2 = frp2->fr_next)
if (frp2 != prevfrp)
minwidth += frame_minwidth(frp2, NOWIN);
prevfrp = frp;
}
available = topframe->fr_width;
needed += minwidth;
}
else
{
minwidth = frame_minwidth(oldwin->w_frame, NULL);
available = oldwin->w_width;
minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
available = oldwin->w_frame->fr_width;
needed += minwidth;
}
if (available < needed && new_wp == NULL)
{
@@ -743,12 +766,10 @@ win_split_ins(size, flags, new_wp, dir)
}
if (new_size == 0)
new_size = oldwin->w_width / 2;
if (new_size > oldwin->w_width - p_wmw - 1)
new_size = oldwin->w_width - p_wmw - 1;
if (new_size > available - minwidth - 1)
new_size = available - minwidth - 1;
if (new_size < p_wmw)
new_size = p_wmw;
if (new_size < wmw1)
new_size = wmw1;
/* if it doesn't fit in the current window, need win_equal() */
if (oldwin->w_width - new_size - 1 < p_wmw)
@@ -789,20 +810,39 @@ win_split_ins(size, flags, new_wp, dir)
* Check if we are able to split the current window and compute its
* height.
*/
needed = p_wmh + STATUS_HEIGHT + need_status;
/* Current window requires at least 1 space. */
wmh1 = (p_wmh == 0 ? 1 : p_wmh);
needed = wmh1 + STATUS_HEIGHT;
if (flags & WSP_ROOM)
needed += p_wh - p_wmh;
if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
needed += p_wh - wmh1;
if (flags & (WSP_BOT | WSP_TOP))
{
minheight = frame_minheight(topframe, NULL);
minheight = frame_minheight(topframe, NOWIN) + need_status;
available = topframe->fr_height;
needed += minheight;
}
else if (p_ea)
{
minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
prevfrp = oldwin->w_frame;
for (frp = oldwin->w_frame->fr_parent; frp != NULL;
frp = frp->fr_parent)
{
if (frp->fr_layout == FR_COL)
for (frp2 = frp->fr_child; frp2 != NULL;
frp2 = frp2->fr_next)
if (frp2 != prevfrp)
minheight += frame_minheight(frp2, NOWIN);
prevfrp = frp;
}
available = topframe->fr_height;
needed += minheight;
}
else
{
minheight = frame_minheight(oldwin->w_frame, NULL);
available = oldwin->w_height;
needed += p_wmh;
minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
available = oldwin->w_frame->fr_height;
needed += minheight;
}
if (available < needed && new_wp == NULL)
{
@@ -817,13 +857,10 @@ win_split_ins(size, flags, new_wp, dir)
}
if (new_size == 0)
new_size = oldwin_height / 2;
if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT)
new_size = oldwin_height - p_wmh - STATUS_HEIGHT;
if (new_size > available - minheight - STATUS_HEIGHT)
new_size = available - minheight - STATUS_HEIGHT;
if (new_size < p_wmh)
new_size = p_wmh;
if (new_size < wmh1)
new_size = wmh1;
/* if it doesn't fit in the current window, need win_equal() */
if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh)