aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--runtime/doc/options.txt14
-rw-r--r--runtime/doc/os_vms.txt1
-rw-r--r--runtime/doc/term.txt18
-rw-r--r--runtime/doc/todo.txt1
-rwxr-xr-xscripts/travis.sh11
-rw-r--r--src/nvim/api/buffer.c2
-rw-r--r--src/nvim/buffer.c12
-rw-r--r--src/nvim/globals.h3
-rw-r--r--src/nvim/option.c4
-rw-r--r--src/nvim/os_unix.c10
-rw-r--r--src/nvim/term.c131
-rw-r--r--src/nvim/testdir/Makefile2
-rw-r--r--src/nvim/testdir/test107.in38
-rw-r--r--src/nvim/testdir/test107.ok4
-rw-r--r--src/nvim/version.c2
16 files changed, 73 insertions, 182 deletions
diff --git a/README.md b/README.md
index b65d22744a..cd09e7eef0 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
[![Stories in Ready](https://badge.waffle.io/neovim/neovim.png?label=ready)](https://waffle.io/neovim/neovim)
[![Coverage Status](https://img.shields.io/coveralls/neovim/neovim.svg)](https://coveralls.io/r/neovim/neovim)
[![Coverity Scan Build](https://scan.coverity.com/projects/2227/badge.svg)](https://scan.coverity.com/projects/2227)
-[![Clang Scan Build](http://img.shields.io/badge/clang-analysis-blue.svg)](http://neovim.org/doc/build-reports/clang)
+[![Clang Scan Build](http://neovim.org/doc/build-reports/clang/badge.svg)](http://neovim.org/doc/build-reports/clang)
[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=461131)](https://www.bountysource.com/trackers/461131-neovim?utm_source=461131&utm_medium=shield&utm_campaign=TRACKER_BADGE)
Neovim is a project that seeks to aggressively refactor Vim in order to:
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 2af731e790..3fdb3f38b5 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3988,9 +3988,8 @@ A jump table for the options with a short description can be found at |Q_op|.
currently being edited. Only the last part of the name is used.
Overridden by the 'iconstring' option.
Only works if the terminal supports setting window icons (currently
- only X11 GUI and terminals with a non-empty 't_IS' option - these are
- Unix xterm and iris-ansi by default, where 't_IS' is taken from the
- builtin termcap).
+ only X11 GUI and terminals with a non-empty 't_IS' option - this is
+ Unix xterm by default, where 't_IS' is taken from the builtin termcap).
When Vim was compiled with HAVE_X11 defined, the original icon will be
restored if possible |X11|. See |X11-icon| for changing the icon on
X11.
@@ -7359,8 +7358,8 @@ A jump table for the options with a short description can be found at |Q_op|.
- VIM the server name |v:servername| or "VIM"
Only works if the terminal supports setting window titles
(currently Amiga console, Win32 console, all GUI versions and
- terminals with a non- empty 't_ts' option - these are Unix xterm and
- iris-ansi by default, where 't_ts' is taken from the builtin termcap).
+ terminals with a non- empty 't_ts' option - this is Unix xterm
+ by default, where 't_ts' is taken from the builtin termcap).
*X11*
When Vim was compiled with HAVE_X11 defined, the original title will
be restored if possible. The output of ":version" will include "+X11"
@@ -7492,9 +7491,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
'ttyfast' 'tf' boolean (default off, on when 'term' is xterm, hpterm,
- sun-cmd, screen, rxvt, dtterm or
- iris-ansi; also on when running Vim in
- a DOS console)
+ sun-cmd, screen, rxvt or dtterm; also
+ on when running Vim in a DOS console)
global
{not in Vi}
Indicates a fast terminal connection. More characters will be sent to
diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt
index 03b11ba87e..82f8ae8b5b 100644
--- a/runtime/doc/os_vms.txt
+++ b/runtime/doc/os_vms.txt
@@ -437,7 +437,6 @@ Terminal entry not found in termcap
builtin_pcansi
builtin_win32
builtin_xterm
- builtin_iris-ansi
builtin_debug
builtin_dumb
defaulting to 'vt320'
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index d2dd547061..f81a530499 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -453,8 +453,7 @@ allows title setting via sending strings. They are sent before and after the
title string, respectively. Similar 't_IS' and 't_IE' are used to set the
icon text. These are Vim-internal extensions of the Unix termcap, so they
cannot be obtained from an external termcap. However, the builtin termcap
-contains suitable entries for xterm and iris-ansi, so you don't need to set
-them here.
+contains suitable entries for xterm, so you don't need to set them here.
*hpterm*
If inversion or other highlighting does not work correctly, try setting the
't_xs' option to a non-empty string. This makes the 't_ce' code be used to
@@ -533,18 +532,9 @@ correct values.
One command can be used to set the screen size:
*:mod* *:mode* *E359* *E362*
-:mod[e] [mode]
-
-Without argument this only detects the screen size and redraws the screen.
-With MS-DOS it is possible to switch screen mode. [mode] can be one of these
-values:
- "bw40" 40 columns black&white
- "c40" 40 columns color
- "bw80" 80 columns black&white
- "c80" 80 columns color (most people use this)
- "mono" 80 columns monochrome
- "c4350" 43 or 50 lines EGA/VGA mode
- number mode number to use, depends on your video card
+:mod[e]
+
+Detects the screen size and redraws the screen.
==============================================================================
4. Slow and fast terminals *slow-fast-terminal*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 21f24a7d33..59578cb3d9 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -2593,7 +2593,6 @@ Macintosh:
":noremap". Add "mapcmd({string}, {mode})? Use code from ":mkexrc".
9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
isn't updated).
-9 term_console is used before it is set (msdos, Amiga).
9 Get out-of-memory for ":g/^/,$s//@/" on 1000 lines, this is not handled
correctly. Get many error messages while redrawing the screen, which
cause another redraw, etc.
diff --git a/scripts/travis.sh b/scripts/travis.sh
index 0530605bce..ceb244a9f4 100755
--- a/scripts/travis.sh
+++ b/scripts/travis.sh
@@ -131,7 +131,7 @@ elif [ "$TRAVIS_BUILD_TYPE" = "gcc/unittest" ]; then
export CC=gcc
set_environment /opt/neovim-deps
export SKIP_EXEC=1
- $MAKE_CMD CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DBUSTED_OUTPUT_TYPE=TAP -DUSE_GCOV=ON" unittest
+ $MAKE_CMD CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DBUSTED_OUTPUT_TYPE=color_terminal -DUSE_GCOV=ON" unittest
coveralls --encoding iso-8859-1 || echo 'coveralls upload failed.'
elif [ "$TRAVIS_BUILD_TYPE" = "gcc/ia32" ]; then
set_environment /opt/neovim-deps/32
@@ -154,7 +154,7 @@ elif [ "$TRAVIS_BUILD_TYPE" = "gcc/ia32" ]; then
# correctly.
sudo apt-get install libncurses5-dev:i386
- CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DBUSTED_OUTPUT_TYPE=TAP \
+ CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DBUSTED_OUTPUT_TYPE=color_terminal \
-DCMAKE_SYSTEM_PROCESSOR=i386 \
-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32 \
-DFIND_LIBRARY_USE_LIB64_PATHS=OFF \
@@ -166,12 +166,13 @@ elif [ "$TRAVIS_BUILD_TYPE" = "clint" ]; then
./scripts/clint.sh
elif [ "$TRAVIS_BUILD_TYPE" = "api/python" ]; then
set_environment /opt/neovim-deps
- $MAKE_CMD
+ sudo apt-get update
sudo apt-get install expect valgrind
+ $MAKE_CMD
git clone --depth=1 -b master git://github.com/neovim/python-client
cd python-client
- sudo pip install .
- sudo pip install nose
+ sudo pip install .
+ sudo pip install nose
test_cmd="nosetests --verbosity=2"
nvim_cmd="valgrind -q --track-origins=yes --leak-check=yes --suppressions=$suppressions --log-file=$tmpdir/valgrind-%p.log ../build/bin/nvim -u NONE"
if ! ../scripts/run-api-tests.exp "$test_cmd" "$nvim_cmd"; then
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 21bfc5ede0..a268e04559 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -490,7 +490,7 @@ static void switch_to_win_for_buf(buf_T *buf,
win_T *wp;
tabpage_T *tp;
- if (find_win_for_buf(buf, &wp, &tp) == FAIL
+ if (!find_win_for_buf(buf, &wp, &tp)
|| switch_win(save_curwinp, save_curtabp, wp, tp, true) == FAIL)
switch_buffer(save_curbufp, buf);
}
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index a1efc98516..ee2b1ecf1d 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -4246,7 +4246,7 @@ char_u *buf_spname(buf_T *buf)
* For location list window, w_llist_ref points to the location list.
* For quickfix window, w_llist_ref is NULL.
*/
- if (find_win_for_buf(buf, &win, &tp) == OK && win->w_llist_ref != NULL)
+ if (find_win_for_buf(buf, &win, &tp) && win->w_llist_ref != NULL)
return (char_u *)_(msg_loclist);
else
return (char_u *)_(msg_qflist);
@@ -4265,17 +4265,17 @@ char_u *buf_spname(buf_T *buf)
/*
* Find a window for buffer "buf".
- * If found OK is returned and "wp" and "tp" are set to the window and tabpage.
- * If not found FAIL is returned.
+ * If found true is returned and "wp" and "tp" are set to the window and tabpage.
+ * If not found false is returned.
*/
-int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp)
+bool find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp)
{
FOR_ALL_TAB_WINDOWS(*tp, *wp) {
if ((*wp)->w_buffer == buf) {
- return OK;
+ return true;
}
}
- return FAIL;
+ return false;
}
/*
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index c0122ae189..a0cbedcc57 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -902,9 +902,6 @@ EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */
/* volatile because it is used in signal handler catch_sigint(). */
EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt
signal occurred */
-#ifdef USE_TERM_CONSOLE
-EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */
-#endif
EXTERN int termcap_active INIT(= FALSE); /* set by starttermcap() */
EXTERN int cur_tmode INIT(= TMODE_COOK); /* input terminal mode */
EXTERN int bangredo INIT(= FALSE); /* set to TRUE with ! command */
diff --git a/src/nvim/option.c b/src/nvim/option.c
index fd834788db..ca49a3dcb8 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -965,10 +965,10 @@ static struct vimoption
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"initclipboard","icpb",P_STRING|P_VI_DEF|P_SECURE,
(char_u *)&p_icpb, PV_NONE,
- {(char_u *)NULL, (char_u *)0L} SCRIPTID_INIT},
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
{"initpython","ipy",P_STRING|P_VI_DEF|P_SECURE,
(char_u *)&p_ipy, PV_NONE,
- {(char_u *)NULL, (char_u *)0L} SCRIPTID_INIT},
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
{"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM,
(char_u *)&p_im, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c
index e3b14fa352..d4b661bff8 100644
--- a/src/nvim/os_unix.c
+++ b/src/nvim/os_unix.c
@@ -298,14 +298,6 @@ int use_xterm_mouse(void)
return 0;
}
-int vim_is_iris(char_u *name)
-{
- if (name == NULL)
- return FALSE;
- return STRNICMP(name, "iris-ansi", 9) == 0
- || STRCMP(name, "builtin_iris-ansi") == 0;
-}
-
int vim_is_vt300(char_u *name)
{
if (name == NULL)
@@ -324,7 +316,7 @@ int vim_is_fastterm(char_u *name)
{
if (name == NULL)
return FALSE;
- if (vim_is_xterm(name) || vim_is_vt300(name) || vim_is_iris(name))
+ if (vim_is_xterm(name) || vim_is_vt300(name))
return TRUE;
return STRNICMP(name, "hpterm", 6) == 0
|| STRNICMP(name, "sun-cmd", 7) == 0
diff --git a/src/nvim/term.c b/src/nvim/term.c
index e231869003..f5c2d3c174 100644
--- a/src/nvim/term.c
+++ b/src/nvim/term.c
@@ -792,115 +792,6 @@ static struct builtin_term builtin_termcaps[] =
{TERMCAP2KEY('F', 'R'), "\033[58;*~"}, /* F37 */
# endif
-# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
- /*
- * iris-ansi for Silicon Graphics machines.
- */
- {(int)KS_NAME, "iris-ansi"},
- {(int)KS_CE, "\033[K"},
- {(int)KS_CD, "\033[J"},
- {(int)KS_AL, "\033[L"},
-# ifdef TERMINFO
- {(int)KS_CAL, "\033[%p1%dL"},
-# else
- {(int)KS_CAL, "\033[%dL"},
-# endif
- {(int)KS_DL, "\033[M"},
-# ifdef TERMINFO
- {(int)KS_CDL, "\033[%p1%dM"},
-# else
- {(int)KS_CDL, "\033[%dM"},
-# endif
- {(int)KS_CL, "\033[H\033[2J"},
- {(int)KS_VE, "\033[9/y\033[12/y"}, /* These aren't documented */
- {(int)KS_VS, "\033[10/y\033[=1h\033[=2l"}, /* These aren't documented */
- {(int)KS_TI, "\033[=6h"},
- {(int)KS_TE, "\033[=6l"},
- {(int)KS_SE, "\033[21;27m"},
- {(int)KS_SO, "\033[1;7m"},
- {(int)KS_ME, "\033[m"},
- {(int)KS_MR, "\033[7m"},
- {(int)KS_MD, "\033[1m"},
- {(int)KS_CCO, "8"}, /* allow 8 colors */
- {(int)KS_CZH, "\033[3m"}, /* italic mode on */
- {(int)KS_CZR, "\033[23m"}, /* italic mode off */
- {(int)KS_US, "\033[4m"}, /* underline on */
- {(int)KS_UE, "\033[24m"}, /* underline off */
-# ifdef TERMINFO
- {(int)KS_CAB, "\033[4%p1%dm"}, /* set background color (ANSI) */
- {(int)KS_CAF, "\033[3%p1%dm"}, /* set foreground color (ANSI) */
- {(int)KS_CSB, "\033[102;%p1%dm"}, /* set screen background color */
- {(int)KS_CSF, "\033[101;%p1%dm"}, /* set screen foreground color */
-# else
- {(int)KS_CAB, "\033[4%dm"}, /* set background color (ANSI) */
- {(int)KS_CAF, "\033[3%dm"}, /* set foreground color (ANSI) */
- {(int)KS_CSB, "\033[102;%dm"}, /* set screen background color */
- {(int)KS_CSF, "\033[101;%dm"}, /* set screen foreground color */
-# endif
- {(int)KS_MS, "y"}, /* guessed */
- {(int)KS_UT, "y"}, /* guessed */
- {(int)KS_LE, "\b"},
-# ifdef TERMINFO
- {(int)KS_CM, "\033[%i%p1%d;%p2%dH"},
-# else
- {(int)KS_CM, "\033[%i%d;%dH"},
-# endif
- {(int)KS_SR, "\033M"},
-# ifdef TERMINFO
- {(int)KS_CRI, "\033[%p1%dC"},
-# else
- {(int)KS_CRI, "\033[%dC"},
-# endif
- {(int)KS_CIS, "\033P3.y"},
- {(int)KS_CIE, "\234"}, /* ST "String Terminator" */
- {(int)KS_TS, "\033P1.y"},
- {(int)KS_FS, "\234"}, /* ST "String Terminator" */
-# ifdef TERMINFO
- {(int)KS_CWS, "\033[203;%p1%d;%p2%d/y"},
- {(int)KS_CWP, "\033[205;%p1%d;%p2%d/y"},
-# else
- {(int)KS_CWS, "\033[203;%d;%d/y"},
- {(int)KS_CWP, "\033[205;%d;%d/y"},
-# endif
- {K_UP, "\033[A"},
- {K_DOWN, "\033[B"},
- {K_LEFT, "\033[D"},
- {K_RIGHT, "\033[C"},
- {K_S_UP, "\033[161q"},
- {K_S_DOWN, "\033[164q"},
- {K_S_LEFT, "\033[158q"},
- {K_S_RIGHT, "\033[167q"},
- {K_F1, "\033[001q"},
- {K_F2, "\033[002q"},
- {K_F3, "\033[003q"},
- {K_F4, "\033[004q"},
- {K_F5, "\033[005q"},
- {K_F6, "\033[006q"},
- {K_F7, "\033[007q"},
- {K_F8, "\033[008q"},
- {K_F9, "\033[009q"},
- {K_F10, "\033[010q"},
- {K_F11, "\033[011q"},
- {K_F12, "\033[012q"},
- {K_S_F1, "\033[013q"},
- {K_S_F2, "\033[014q"},
- {K_S_F3, "\033[015q"},
- {K_S_F4, "\033[016q"},
- {K_S_F5, "\033[017q"},
- {K_S_F6, "\033[018q"},
- {K_S_F7, "\033[019q"},
- {K_S_F8, "\033[020q"},
- {K_S_F9, "\033[021q"},
- {K_S_F10, "\033[022q"},
- {K_S_F11, "\033[023q"},
- {K_S_F12, "\033[024q"},
- {K_INS, "\033[139q"},
- {K_HOME, "\033[H"},
- {K_END, "\033[146q"},
- {K_PAGEUP, "\033[150q"},
- {K_PAGEDOWN, "\033[154q"},
-# endif
-
# if defined(DEBUG) || defined(ALL_BUILTIN_TCAPS)
/*
* for debugging
@@ -1132,9 +1023,7 @@ static struct builtin_term *find_builtin_term(char_u *term)
while (p->bt_string != NULL) {
if (p->bt_entry == (int)KS_NAME) {
#ifdef UNIX
- if (STRCMP(p->bt_string, "iris-ansi") == 0 && vim_is_iris(term))
- return p;
- else if (STRCMP(p->bt_string, "xterm") == 0 && vim_is_xterm(term))
+ if (STRCMP(p->bt_string, "xterm") == 0 && vim_is_xterm(term))
return p;
else
#endif
@@ -1530,29 +1419,13 @@ int set_termname(char_u *term)
# endif
-#ifdef USE_TERM_CONSOLE
- /* DEFAULT_TERM indicates that it is the machine console. */
- if (STRCMP(term, DEFAULT_TERM) != 0)
- term_console = FALSE;
- else {
- term_console = TRUE;
- }
-#endif
-
#if defined(UNIX)
/*
- * 'ttyfast' is default on for xterm, iris-ansi and a few others.
+ * 'ttyfast' is default on for xterm and a few others.
*/
if (vim_is_fastterm(term))
p_tf = TRUE;
#endif
-#ifdef USE_TERM_CONSOLE
- /*
- * 'ttyfast' is default on consoles
- */
- if (term_console)
- p_tf = TRUE;
-#endif
ttest(TRUE); /* make sure we have a valid set of terminal codes */
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index c93706fce2..21f2928593 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -29,7 +29,7 @@ SCRIPTS := test_autoformat_join.out \
test91.out test92.out test93.out test94.out test95.out \
test96.out test97.out test98.out test99.out test100.out \
test101.out test102.out test103.out test104.out test105.out \
- test106.out
+ test106.out test107.out
SCRIPTS_GUI := test16.out
diff --git a/src/nvim/testdir/test107.in b/src/nvim/testdir/test107.in
new file mode 100644
index 0000000000..9143380f18
--- /dev/null
+++ b/src/nvim/testdir/test107.in
@@ -0,0 +1,38 @@
+Tests for adjusting window and contents vim: set ft=vim :
+
+STARTTEST
+:so small.vim
+:new
+:call setline(1, range(1,256))
+:let r=[]
+:func! GetScreenStr(row)
+: let str = ""
+: for c in range(1,3)
+: let str .= nr2char(screenchar(a:row, c))
+: endfor
+: return str
+:endfunc
+:
+:exe ":norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+"
+:let s3=GetScreenStr(1)
+:wincmd p
+:call add(r, [line("w0"), s3])
+:
+:exe ":norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+"
+:let s3=GetScreenStr(1)
+:wincmd p
+:call add(r, [line("w0"), s3])
+:
+:exe ":norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+"
+:let s3=GetScreenStr(1)
+::wincmd p
+:call add(r, [line("w0"), s3])
+:
+:bwipeout!
+:$put=r
+:call garbagecollect(1)
+:"
+:/^start:/,$wq! test.out
+ENDTEST
+
+start:
diff --git a/src/nvim/testdir/test107.ok b/src/nvim/testdir/test107.ok
new file mode 100644
index 0000000000..3e0eda1fe7
--- /dev/null
+++ b/src/nvim/testdir/test107.ok
@@ -0,0 +1,4 @@
+start:
+[1, '1 ']
+[50, '50 ']
+[59, '59 ']
diff --git a/src/nvim/version.c b/src/nvim/version.c
index c59642ba8c..dd39070558 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -234,7 +234,7 @@ static int included_patches[] = {
//318,
//317,
//316,
- //315,
+ 315,
//314,
//313,
//312,