diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-10-12 20:02:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-10-12 20:02:24 +0000 |
commit | 47136d70fafd8b101965b8d3d4bb72f5fe7dc231 (patch) | |
tree | bc1a155c840da31d5fe81b25e25b72c74b16308f /src | |
parent | 5c4e21cf4dd92ebbc8681abd7516c86f902024c0 (diff) |
updated for version 7.0019v7.0019
Diffstat (limited to 'src')
-rwxr-xr-x | src/auto/configure | 2 | ||||
-rw-r--r-- | src/configure.in | 2 | ||||
-rw-r--r-- | src/eval.c | 77 | ||||
-rw-r--r-- | src/os_unix.c | 11 | ||||
-rw-r--r-- | src/testdir/Makefile | 2 |
5 files changed, 84 insertions, 10 deletions
diff --git a/src/auto/configure b/src/auto/configure index 29bb14801e..e30c2dde38 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -2271,7 +2271,7 @@ echo "configure:2266: checking Tcl version" >&5 echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6 echo "configure:2273: checking for location of Tcl include" >&5 if test "x$MACOSX" != "xyes"; then - tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include" + tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/include" else tclinc="/System/Library/Frameworks/Tcl.framework/Headers" fi diff --git a/src/configure.in b/src/configure.in index d1d01ca581..070c41b5dd 100644 --- a/src/configure.in +++ b/src/configure.in @@ -713,7 +713,7 @@ if test "$enable_tclinterp" = "yes"; then AC_MSG_CHECKING(for location of Tcl include) if test "x$MACOSX" != "xyes"; then - tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include" + tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/include" else dnl For Mac OS X 10.3, use the OS-provided framework location tclinc="/System/Library/Frameworks/Tcl.framework/Headers" diff --git a/src/eval.c b/src/eval.c index 1690eab8a8..8416b578f7 100644 --- a/src/eval.c +++ b/src/eval.c @@ -274,6 +274,8 @@ static void f_cscope_connection __ARGS((VAR argvars, VAR retvar)); static void f_cursor __ARGS((VAR argsvars, VAR retvar)); static void f_delete __ARGS((VAR argvars, VAR retvar)); static void f_did_filetype __ARGS((VAR argvars, VAR retvar)); +static void f_diff_filler __ARGS((VAR argvars, VAR retvar)); +static void f_diff_hlID __ARGS((VAR argvars, VAR retvar)); static void f_escape __ARGS((VAR argvars, VAR retvar)); static void f_eventhandler __ARGS((VAR argvars, VAR retvar)); static void f_executable __ARGS((VAR argvars, VAR retvar)); @@ -2837,6 +2839,8 @@ static struct fst {"cursor", 2, 2, f_cursor}, {"delete", 1, 1, f_delete}, {"did_filetype", 0, 0, f_did_filetype}, + {"diff_filler", 1, 1, f_diff_filler}, + {"diff_hlID", 2, 2, f_diff_hlID}, {"escape", 2, 2, f_escape}, {"eventhandler", 0, 0, f_eventhandler}, {"executable", 1, 1, f_executable}, @@ -3977,6 +3981,79 @@ f_did_filetype(argvars, retvar) } /* + * "diff_filler()" function + */ +/*ARGSUSED*/ + static void +f_diff_filler(argvars, retvar) + VAR argvars; + VAR retvar; +{ +#ifdef FEAT_DIFF + retvar->var_val.var_number = diff_check_fill(curwin, get_var_lnum(argvars)); +#endif +} + +/* + * "diff_hlID()" function + */ +/*ARGSUSED*/ + static void +f_diff_hlID(argvars, retvar) + VAR argvars; + VAR retvar; +{ +#ifdef FEAT_DIFF + linenr_T lnum = get_var_lnum(argvars); + static linenr_T prev_lnum = 0; + static int changedtick = 0; + static int fnum = 0; + static int change_start = 0; + static int change_end = 0; + static enum hlf_value hlID = 0; + int filler_lines; + int col; + + if (lnum != prev_lnum + || changedtick != curbuf->b_changedtick + || fnum != curbuf->b_fnum) + { + /* New line, buffer, change: need to get the values. */ + filler_lines = diff_check(curwin, lnum); + if (filler_lines < 0) + { + if (filler_lines == -1) + { + change_start = MAXCOL; + change_end = -1; + if (diff_find_change(curwin, lnum, &change_start, &change_end)) + hlID = HLF_ADD; /* added line */ + else + hlID = HLF_CHD; /* changed line */ + } + else + hlID = HLF_ADD; /* added line */ + } + else + hlID = (enum hlf_value)0; + prev_lnum = lnum; + changedtick = curbuf->b_changedtick; + fnum = curbuf->b_fnum; + } + + if (hlID == HLF_CHD || hlID == HLF_TXD) + { + col = get_var_number(&argvars[1]) - 1; + if (col >= change_start && col <= change_end) + hlID = HLF_TXD; /* changed text */ + else + hlID = HLF_CHD; /* changed line */ + } + retvar->var_val.var_number = hlID == (enum hlf_value)0 ? 0 : (int)hlID; +#endif +} + +/* * "escape({string}, {chars})" function */ static void diff --git a/src/os_unix.c b/src/os_unix.c index 24c86b2619..ffc696579c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1535,13 +1535,7 @@ get_x11_windis() get_x11_title(test_only) int test_only; { - int retval; - - retval = get_x11_thing(TRUE, test_only); - - /* could not get old title: oldtitle == NULL */ - - return retval; + return get_x11_thing(TRUE, test_only); } /* @@ -1829,7 +1823,8 @@ mch_settitle(title, icon) * than x11 calls, because the x11 calls don't always work */ #ifdef FEAT_GUI_KDE - /* dont know why but KDE needs this one as we don't go through the next function... */ + /* dont know why but KDE needs this one as we don't go through the next + * function... */ gui_mch_settitle(title, icon); #endif if ((type || *T_TS != NUL) && title != NULL) diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 57de3ab23c..c260eb45a1 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -47,6 +47,8 @@ test1.out: test1.in .in.out: -rm -f $*.failed test.ok X* cp $*.ok test.ok + # Sleep a moment to avoid that the xterm title is messed up + @-sleep .2 $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in @/bin/sh -c "if diff test.out $*.ok; \ then mv -f test.out $*.out; \ |