|
Karsten Hopp |
81c285 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
81c285 |
Subject: Patch 7.2.167
|
|
Karsten Hopp |
81c285 |
Fcc: outbox
|
|
Karsten Hopp |
81c285 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
81c285 |
Mime-Version: 1.0
|
|
Karsten Hopp |
81c285 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
81c285 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
81c285 |
------------
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
Patch 7.2.167
|
|
Karsten Hopp |
81c285 |
Problem: Splint doesn't work well for checking the code.
|
|
Karsten Hopp |
81c285 |
Solution: Add splint arguments in the Makefile. Exclude some code from
|
|
Karsten Hopp |
81c285 |
splint that it can't handle. Tune splint arguments to give
|
|
Karsten Hopp |
81c285 |
reasonable errors. Add a filter for removing false warnings from
|
|
Karsten Hopp |
81c285 |
splint output. Many small changes to avoid warnings. More to
|
|
Karsten Hopp |
81c285 |
follow...
|
|
Karsten Hopp |
81c285 |
Files: Filelist, src/Makefile, src/buffer.c, src/charset.c,
|
|
Karsten Hopp |
81c285 |
src/cleanlint.vim, src/digraph.c, src/edit.c, src/ex_cmds.c,
|
|
Karsten Hopp |
81c285 |
src/globals.h, src/ops.c, src/os_unix.c, src/os_unix.h,
|
|
Karsten Hopp |
81c285 |
src/proto/buffer.pro, src/proto/edit.pro, src/screen.c,
|
|
Karsten Hopp |
81c285 |
src/structs.h
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/Filelist 2008-09-20 16:26:10.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- Filelist 2009-05-05 21:45:49.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 139,144 ****
|
|
Karsten Hopp |
81c285 |
--- 139,145 ----
|
|
Karsten Hopp |
81c285 |
src/INSTALL \
|
|
Karsten Hopp |
81c285 |
src/INSTALLx.txt \
|
|
Karsten Hopp |
81c285 |
src/Makefile \
|
|
Karsten Hopp |
81c285 |
+ src/cleanlint.vim \
|
|
Karsten Hopp |
81c285 |
src/auto/configure \
|
|
Karsten Hopp |
81c285 |
src/config.aap.in \
|
|
Karsten Hopp |
81c285 |
src/config.h.in \
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 683,691 ****
|
|
Karsten Hopp |
81c285 |
runtime/spell/??/main.aap \
|
|
Karsten Hopp |
81c285 |
runtime/spell/yi/README.txt \
|
|
Karsten Hopp |
81c285 |
runtime/spell/main.aap \
|
|
Karsten Hopp |
81c285 |
- runtime/spell/cleanadd.vim \
|
|
Karsten Hopp |
81c285 |
runtime/spell/*.vim \
|
|
Karsten Hopp |
81c285 |
- runtime/spell/fixdup \
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# generic language files, binary
|
|
Karsten Hopp |
81c285 |
LANG_GEN_BIN = \
|
|
Karsten Hopp |
81c285 |
--- 684,690 ----
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/Makefile 2009-04-29 18:44:45.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/Makefile 2009-05-06 00:23:15.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 551,557 ****
|
|
Karsten Hopp |
81c285 |
# }}}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# LINT - for running lint
|
|
Karsten Hopp |
81c285 |
! LINT_OPTIONS = -beprxzF
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
|
|
Karsten Hopp |
81c285 |
# Might not work with GUI or Perl.
|
|
Karsten Hopp |
81c285 |
--- 551,562 ----
|
|
Karsten Hopp |
81c285 |
# }}}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# LINT - for running lint
|
|
Karsten Hopp |
81c285 |
! # For standard lint
|
|
Karsten Hopp |
81c285 |
! #LINT = lint
|
|
Karsten Hopp |
81c285 |
! #LINT_OPTIONS = -beprxzF
|
|
Karsten Hopp |
81c285 |
! # For splint (see cleanlint.vim for filtering the output)
|
|
Karsten Hopp |
81c285 |
! LINT = splint
|
|
Karsten Hopp |
81c285 |
! LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
|
|
Karsten Hopp |
81c285 |
# Might not work with GUI or Perl.
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1259,1274 ****
|
|
Karsten Hopp |
81c285 |
# This is for cproto 3 patchlevel 8 or below
|
|
Karsten Hopp |
81c285 |
# __inline, __attribute__ and __extension__ are not recognized by cproto
|
|
Karsten Hopp |
81c285 |
# G_IMPLEMENT_INLINES is to avoid functions defined in glib/gutils.h.
|
|
Karsten Hopp |
81c285 |
! NO_ATTR = -D__inline= -D__inline__= -DG_IMPLEMENT_INLINES \
|
|
Karsten Hopp |
81c285 |
! -D"__attribute__\\(x\\)=" -D"__asm__\\(x\\)=" \
|
|
Karsten Hopp |
81c285 |
! -D__extension__= -D__restrict="" \
|
|
Karsten Hopp |
81c285 |
! -D__gnuc_va_list=char -D__builtin_va_list=char
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#
|
|
Karsten Hopp |
81c285 |
! # This is for cproto 3 patchlevel 9 or above (currently 4.6)
|
|
Karsten Hopp |
81c285 |
# __inline and __attribute__ are now recognized by cproto
|
|
Karsten Hopp |
81c285 |
# -D"foo()=" is not supported by all compilers so do not use it
|
|
Karsten Hopp |
81c285 |
! # NO_ATTR=
|
|
Karsten Hopp |
81c285 |
#
|
|
Karsten Hopp |
81c285 |
# maybe the "/usr/bin/cc -E" has to be adjusted for some systems
|
|
Karsten Hopp |
81c285 |
# This is for cproto 3.5 patchlevel 3:
|
|
Karsten Hopp |
81c285 |
--- 1264,1279 ----
|
|
Karsten Hopp |
81c285 |
# This is for cproto 3 patchlevel 8 or below
|
|
Karsten Hopp |
81c285 |
# __inline, __attribute__ and __extension__ are not recognized by cproto
|
|
Karsten Hopp |
81c285 |
# G_IMPLEMENT_INLINES is to avoid functions defined in glib/gutils.h.
|
|
Karsten Hopp |
81c285 |
! #NO_ATTR = -D__inline= -D__inline__= -DG_IMPLEMENT_INLINES \
|
|
Karsten Hopp |
81c285 |
! # -D"__attribute__\\(x\\)=" -D"__asm__\\(x\\)=" \
|
|
Karsten Hopp |
81c285 |
! # -D__extension__= -D__restrict="" \
|
|
Karsten Hopp |
81c285 |
! # -D__gnuc_va_list=char -D__builtin_va_list=char
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#
|
|
Karsten Hopp |
81c285 |
! # This is for cproto 3 patchlevel 9 or above (currently 4.6, 4.7g)
|
|
Karsten Hopp |
81c285 |
# __inline and __attribute__ are now recognized by cproto
|
|
Karsten Hopp |
81c285 |
# -D"foo()=" is not supported by all compilers so do not use it
|
|
Karsten Hopp |
81c285 |
! NO_ATTR=
|
|
Karsten Hopp |
81c285 |
#
|
|
Karsten Hopp |
81c285 |
# maybe the "/usr/bin/cc -E" has to be adjusted for some systems
|
|
Karsten Hopp |
81c285 |
# This is for cproto 3.5 patchlevel 3:
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1432,1437 ****
|
|
Karsten Hopp |
81c285 |
--- 1437,1443 ----
|
|
Karsten Hopp |
81c285 |
$(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC) $(NETBEANS_SRC)
|
|
Karsten Hopp |
81c285 |
#LINT_SRC = $(SRC)
|
|
Karsten Hopp |
81c285 |
#LINT_SRC = $(ALL_SRC)
|
|
Karsten Hopp |
81c285 |
+ #LINT_SRC = $(BASIC_SRC)
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
OBJ = \
|
|
Karsten Hopp |
81c285 |
objects/buffer.o \
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2272,2283 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# Run lint. Clean up the *.ln files that are sometimes left behind.
|
|
Karsten Hopp |
81c285 |
lint:
|
|
Karsten Hopp |
81c285 |
! lint $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
|
|
Karsten Hopp |
81c285 |
-rm -f *.ln
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# Check dosinst.c with lint.
|
|
Karsten Hopp |
81c285 |
lintinstall:
|
|
Karsten Hopp |
81c285 |
! lint $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
|
|
Karsten Hopp |
81c285 |
-rm -f dosinst.ln
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
###########################################################################
|
|
Karsten Hopp |
81c285 |
--- 2279,2290 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# Run lint. Clean up the *.ln files that are sometimes left behind.
|
|
Karsten Hopp |
81c285 |
lint:
|
|
Karsten Hopp |
81c285 |
! $(LINT) $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
|
|
Karsten Hopp |
81c285 |
-rm -f *.ln
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# Check dosinst.c with lint.
|
|
Karsten Hopp |
81c285 |
lintinstall:
|
|
Karsten Hopp |
81c285 |
! $(LINT) $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
|
|
Karsten Hopp |
81c285 |
-rm -f dosinst.ln
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
###########################################################################
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/buffer.c 2009-02-22 00:01:42.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/buffer.c 2009-05-13 12:25:29.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 44,49 ****
|
|
Karsten Hopp |
81c285 |
--- 44,50 ----
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_TITLE
|
|
Karsten Hopp |
81c285 |
static int ti_change __ARGS((char_u *str, char_u **last));
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
+ static int append_arg_number __ARGS((win_T *wp, char_u *buf, int buflen, int add_file));
|
|
Karsten Hopp |
81c285 |
static void free_buffer __ARGS((buf_T *));
|
|
Karsten Hopp |
81c285 |
static void free_buffer_stuff __ARGS((buf_T *buf, int free_options));
|
|
Karsten Hopp |
81c285 |
static void clear_wininfo __ARGS((buf_T *buf));
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1453,1465 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_KEYMAP
|
|
Karsten Hopp |
81c285 |
if (curbuf->b_kmap_state & KEYMAP_INIT)
|
|
Karsten Hopp |
81c285 |
! keymap_init();
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_SPELL
|
|
Karsten Hopp |
81c285 |
/* May need to set the spell language. Can only do this after the buffer
|
|
Karsten Hopp |
81c285 |
* has been properly setup. */
|
|
Karsten Hopp |
81c285 |
if (!curbuf->b_help && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
|
|
Karsten Hopp |
81c285 |
! did_set_spelllang(curbuf);
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
redraw_later(NOT_VALID);
|
|
Karsten Hopp |
81c285 |
--- 1454,1466 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_KEYMAP
|
|
Karsten Hopp |
81c285 |
if (curbuf->b_kmap_state & KEYMAP_INIT)
|
|
Karsten Hopp |
81c285 |
! (void)keymap_init();
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_SPELL
|
|
Karsten Hopp |
81c285 |
/* May need to set the spell language. Can only do this after the buffer
|
|
Karsten Hopp |
81c285 |
* has been properly setup. */
|
|
Karsten Hopp |
81c285 |
if (!curbuf->b_help && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
|
|
Karsten Hopp |
81c285 |
! (void)did_set_spelllang(curbuf);
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
redraw_later(NOT_VALID);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2516,2522 ****
|
|
Karsten Hopp |
81c285 |
buf_T *buf;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
wininfo_T *wip;
|
|
Karsten Hopp |
81c285 |
! static pos_T no_position = {1, 0};
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
wip = find_wininfo(buf, FALSE);
|
|
Karsten Hopp |
81c285 |
if (wip != NULL)
|
|
Karsten Hopp |
81c285 |
--- 2517,2523 ----
|
|
Karsten Hopp |
81c285 |
buf_T *buf;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
wininfo_T *wip;
|
|
Karsten Hopp |
81c285 |
! static pos_T no_position = INIT_POS_T(1, 0, 0);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
wip = find_wininfo(buf, FALSE);
|
|
Karsten Hopp |
81c285 |
if (wip != NULL)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2577,2584 ****
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
IObuff[len++] = ' ';
|
|
Karsten Hopp |
81c285 |
} while (--i > 0 && len < IOSIZE - 18);
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)IObuff + len, IOSIZE - len, _("line %ld"),
|
|
Karsten Hopp |
81c285 |
! buf == curbuf ? curwin->w_cursor.lnum
|
|
Karsten Hopp |
81c285 |
: (long)buflist_findlnum(buf));
|
|
Karsten Hopp |
81c285 |
msg_outtrans(IObuff);
|
|
Karsten Hopp |
81c285 |
out_flush(); /* output one line at a time */
|
|
Karsten Hopp |
81c285 |
--- 2578,2585 ----
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
IObuff[len++] = ' ';
|
|
Karsten Hopp |
81c285 |
} while (--i > 0 && len < IOSIZE - 18);
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
|
|
Karsten Hopp |
81c285 |
! _("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
|
|
Karsten Hopp |
81c285 |
: (long)buflist_findlnum(buf));
|
|
Karsten Hopp |
81c285 |
msg_outtrans(IObuff);
|
|
Karsten Hopp |
81c285 |
out_flush(); /* output one line at a time */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2967,2973 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (fullname > 1) /* 2 CTRL-G: include buffer number */
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buffer, "buf %d: ", curbuf->b_fnum);
|
|
Karsten Hopp |
81c285 |
p = buffer + STRLEN(buffer);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
--- 2968,2974 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (fullname > 1) /* 2 CTRL-G: include buffer number */
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
|
|
Karsten Hopp |
81c285 |
p = buffer + STRLEN(buffer);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3041,3051 ****
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
n);
|
|
Karsten Hopp |
81c285 |
validate_virtcol();
|
|
Karsten Hopp |
81c285 |
! col_print(buffer + STRLEN(buffer),
|
|
Karsten Hopp |
81c285 |
(int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! (void)append_arg_number(curwin, buffer, !shortmess(SHM_FILE), IOSIZE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (dont_truncate)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 3042,3053 ----
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
n);
|
|
Karsten Hopp |
81c285 |
validate_virtcol();
|
|
Karsten Hopp |
81c285 |
! len = STRLEN(buffer);
|
|
Karsten Hopp |
81c285 |
! col_print(buffer + len, IOSIZE - len,
|
|
Karsten Hopp |
81c285 |
(int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (dont_truncate)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3073,3087 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! col_print(buf, col, vcol)
|
|
Karsten Hopp |
81c285 |
char_u *buf;
|
|
Karsten Hopp |
81c285 |
int col;
|
|
Karsten Hopp |
81c285 |
int vcol;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (col == vcol)
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buf, "%d", col);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buf, "%d-%d", col, vcol);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_TITLE) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
--- 3075,3090 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! col_print(buf, buflen, col, vcol)
|
|
Karsten Hopp |
81c285 |
char_u *buf;
|
|
Karsten Hopp |
81c285 |
+ size_t buflen;
|
|
Karsten Hopp |
81c285 |
int col;
|
|
Karsten Hopp |
81c285 |
int vcol;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (col == vcol)
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buf, buflen, "%d", col);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buf, buflen, "%d-%d", col, vcol);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_TITLE) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3194,3211 ****
|
|
Karsten Hopp |
81c285 |
if (p == buf + off)
|
|
Karsten Hopp |
81c285 |
/* must be a help buffer */
|
|
Karsten Hopp |
81c285 |
vim_strncpy(buf + off, (char_u *)_("help"),
|
|
Karsten Hopp |
81c285 |
! IOSIZE - off - 1);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
*p = NUL;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* translate unprintable chars */
|
|
Karsten Hopp |
81c285 |
p = transstr(buf + off);
|
|
Karsten Hopp |
81c285 |
! vim_strncpy(buf + off, p, IOSIZE - off - 1);
|
|
Karsten Hopp |
81c285 |
vim_free(p);
|
|
Karsten Hopp |
81c285 |
STRCAT(buf, ")");
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! append_arg_number(curwin, buf, FALSE, IOSIZE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_CLIENTSERVER)
|
|
Karsten Hopp |
81c285 |
if (serverName != NULL)
|
|
Karsten Hopp |
81c285 |
--- 3197,3214 ----
|
|
Karsten Hopp |
81c285 |
if (p == buf + off)
|
|
Karsten Hopp |
81c285 |
/* must be a help buffer */
|
|
Karsten Hopp |
81c285 |
vim_strncpy(buf + off, (char_u *)_("help"),
|
|
Karsten Hopp |
81c285 |
! (size_t)(IOSIZE - off - 1));
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
*p = NUL;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* translate unprintable chars */
|
|
Karsten Hopp |
81c285 |
p = transstr(buf + off);
|
|
Karsten Hopp |
81c285 |
! vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
|
|
Karsten Hopp |
81c285 |
vim_free(p);
|
|
Karsten Hopp |
81c285 |
STRCAT(buf, ")");
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! append_arg_number(curwin, buf, IOSIZE, FALSE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_CLIENTSERVER)
|
|
Karsten Hopp |
81c285 |
if (serverName != NULL)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3520,3526 ****
|
|
Karsten Hopp |
81c285 |
n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
*t = '<';
|
|
Karsten Hopp |
81c285 |
! mch_memmove(t + 1, t + n, p - (t + n));
|
|
Karsten Hopp |
81c285 |
p = p - n + 1;
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
/* Fill up space left over by half a double-wide char. */
|
|
Karsten Hopp |
81c285 |
--- 3523,3529 ----
|
|
Karsten Hopp |
81c285 |
n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
*t = '<';
|
|
Karsten Hopp |
81c285 |
! mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
|
|
Karsten Hopp |
81c285 |
p = p - n + 1;
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
/* Fill up space left over by half a double-wide char. */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3550,3556 ****
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* fill by inserting characters */
|
|
Karsten Hopp |
81c285 |
! mch_memmove(t + n - l, t, p - t);
|
|
Karsten Hopp |
81c285 |
l = n - l;
|
|
Karsten Hopp |
81c285 |
if (p + l >= out + outlen)
|
|
Karsten Hopp |
81c285 |
l = (long)((out + outlen) - p - 1);
|
|
Karsten Hopp |
81c285 |
--- 3553,3559 ----
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* fill by inserting characters */
|
|
Karsten Hopp |
81c285 |
! mch_memmove(t + n - l, t, (size_t)(p - t));
|
|
Karsten Hopp |
81c285 |
l = n - l;
|
|
Karsten Hopp |
81c285 |
if (p + l >= out + outlen)
|
|
Karsten Hopp |
81c285 |
l = (long)((out + outlen) - p - 1);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3686,3692 ****
|
|
Karsten Hopp |
81c285 |
p = t;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_EVAL
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)tmp, "%d", curbuf->b_fnum);
|
|
Karsten Hopp |
81c285 |
set_internal_string_var((char_u *)"actual_curbuf", tmp);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
o_curbuf = curbuf;
|
|
Karsten Hopp |
81c285 |
--- 3689,3695 ----
|
|
Karsten Hopp |
81c285 |
p = t;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_EVAL
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
|
|
Karsten Hopp |
81c285 |
set_internal_string_var((char_u *)"actual_curbuf", tmp);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
o_curbuf = curbuf;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3753,3765 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
case STL_ALTPERCENT:
|
|
Karsten Hopp |
81c285 |
str = tmp;
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, str);
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
case STL_ARGLISTSTAT:
|
|
Karsten Hopp |
81c285 |
fillable = FALSE;
|
|
Karsten Hopp |
81c285 |
tmp[0] = 0;
|
|
Karsten Hopp |
81c285 |
! if (append_arg_number(wp, tmp, FALSE, (int)sizeof(tmp)))
|
|
Karsten Hopp |
81c285 |
str = tmp;
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 3756,3768 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
case STL_ALTPERCENT:
|
|
Karsten Hopp |
81c285 |
str = tmp;
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, str, TMPLEN);
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
case STL_ARGLISTSTAT:
|
|
Karsten Hopp |
81c285 |
fillable = FALSE;
|
|
Karsten Hopp |
81c285 |
tmp[0] = 0;
|
|
Karsten Hopp |
81c285 |
! if (append_arg_number(wp, tmp, (int)sizeof(tmp), FALSE))
|
|
Karsten Hopp |
81c285 |
str = tmp;
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3794,3800 ****
|
|
Karsten Hopp |
81c285 |
case STL_BYTEVAL_X:
|
|
Karsten Hopp |
81c285 |
base = 'X';
|
|
Karsten Hopp |
81c285 |
case STL_BYTEVAL:
|
|
Karsten Hopp |
81c285 |
! if (wp->w_cursor.col > STRLEN(linecont))
|
|
Karsten Hopp |
81c285 |
num = 0;
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 3797,3803 ----
|
|
Karsten Hopp |
81c285 |
case STL_BYTEVAL_X:
|
|
Karsten Hopp |
81c285 |
base = 'X';
|
|
Karsten Hopp |
81c285 |
case STL_BYTEVAL:
|
|
Karsten Hopp |
81c285 |
! if (wp->w_cursor.col > (colnr_T)STRLEN(linecont))
|
|
Karsten Hopp |
81c285 |
num = 0;
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3967,3973 ****
|
|
Karsten Hopp |
81c285 |
if (zeropad)
|
|
Karsten Hopp |
81c285 |
*t++ = '0';
|
|
Karsten Hopp |
81c285 |
*t++ = '*';
|
|
Karsten Hopp |
81c285 |
! *t++ = nbase == 16 ? base : (nbase == 8 ? 'o' : 'd');
|
|
Karsten Hopp |
81c285 |
*t = 0;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
for (n = num, l = 1; n >= nbase; n /= nbase)
|
|
Karsten Hopp |
81c285 |
--- 3970,3976 ----
|
|
Karsten Hopp |
81c285 |
if (zeropad)
|
|
Karsten Hopp |
81c285 |
*t++ = '0';
|
|
Karsten Hopp |
81c285 |
*t++ = '*';
|
|
Karsten Hopp |
81c285 |
! *t++ = nbase == 16 ? base : (char_u)(nbase == 8 ? 'o' : 'd');
|
|
Karsten Hopp |
81c285 |
*t = 0;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
for (n = num, l = 1; n >= nbase; n /= nbase)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4160,4172 ****
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
|
|
Karsten Hopp |
81c285 |
|| defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
! * Get relative cursor position in window into "str[]", in the form 99%, using
|
|
Karsten Hopp |
81c285 |
! * "Top", "Bot" or "All" when appropriate.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, str)
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
! char_u *str;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
long above; /* number of lines above window */
|
|
Karsten Hopp |
81c285 |
long below; /* number of lines below window */
|
|
Karsten Hopp |
81c285 |
--- 4163,4176 ----
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
|
|
Karsten Hopp |
81c285 |
|| defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
! * Get relative cursor position in window into "buf[buflen]", in the form 99%,
|
|
Karsten Hopp |
81c285 |
! * using "Top", "Bot" or "All" when appropriate.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, buf, buflen)
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
! char_u *buf;
|
|
Karsten Hopp |
81c285 |
! int buflen;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
long above; /* number of lines above window */
|
|
Karsten Hopp |
81c285 |
long below; /* number of lines below window */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4177,4210 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
|
|
Karsten Hopp |
81c285 |
if (below <= 0)
|
|
Karsten Hopp |
81c285 |
! STRCPY(str, above == 0 ? _("All") : _("Bot"));
|
|
Karsten Hopp |
81c285 |
else if (above <= 0)
|
|
Karsten Hopp |
81c285 |
! STRCPY(str, _("Top"));
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)str, "%2d%%", above > 1000000L
|
|
Karsten Hopp |
81c285 |
? (int)(above / ((above + below) / 100L))
|
|
Karsten Hopp |
81c285 |
: (int)(above * 100L / (above + below)));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
! * Append (file 2 of 8) to 'buf', if editing more than one file.
|
|
Karsten Hopp |
81c285 |
* Return TRUE if it was appended.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! int
|
|
Karsten Hopp |
81c285 |
! append_arg_number(wp, buf, add_file, maxlen)
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
char_u *buf;
|
|
Karsten Hopp |
81c285 |
int add_file; /* Add "file" before the arg number */
|
|
Karsten Hopp |
81c285 |
- int maxlen; /* maximum nr of chars in buf or zero*/
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *p;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (ARGCOUNT <= 1) /* nothing to do */
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! p = buf + STRLEN(buf); /* go to the end of the buffer */
|
|
Karsten Hopp |
81c285 |
! if (maxlen && p - buf + 35 >= maxlen) /* getting too long */
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
*p++ = ' ';
|
|
Karsten Hopp |
81c285 |
*p++ = '(';
|
|
Karsten Hopp |
81c285 |
--- 4181,4215 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
|
|
Karsten Hopp |
81c285 |
if (below <= 0)
|
|
Karsten Hopp |
81c285 |
! vim_strncpy(buf, (char_u *)(above == 0 ? _("All") : _("Bot")),
|
|
Karsten Hopp |
81c285 |
! (size_t)(buflen - 1));
|
|
Karsten Hopp |
81c285 |
else if (above <= 0)
|
|
Karsten Hopp |
81c285 |
! vim_strncpy(buf, (char_u *)_("Top"), (size_t)(buflen - 1));
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buf, (size_t)buflen, "%2d%%", above > 1000000L
|
|
Karsten Hopp |
81c285 |
? (int)(above / ((above + below) / 100L))
|
|
Karsten Hopp |
81c285 |
: (int)(above * 100L / (above + below)));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
! * Append (file 2 of 8) to "buf[buflen]", if editing more than one file.
|
|
Karsten Hopp |
81c285 |
* Return TRUE if it was appended.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! static int
|
|
Karsten Hopp |
81c285 |
! append_arg_number(wp, buf, buflen, add_file)
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
char_u *buf;
|
|
Karsten Hopp |
81c285 |
+ int buflen;
|
|
Karsten Hopp |
81c285 |
int add_file; /* Add "file" before the arg number */
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *p;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (ARGCOUNT <= 1) /* nothing to do */
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! p = buf + STRLEN(buf); /* go to the end of the buffer */
|
|
Karsten Hopp |
81c285 |
! if (p - buf + 35 >= buflen) /* getting too long */
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
*p++ = ' ';
|
|
Karsten Hopp |
81c285 |
*p++ = '(';
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4213,4219 ****
|
|
Karsten Hopp |
81c285 |
STRCPY(p, "file ");
|
|
Karsten Hopp |
81c285 |
p += 5;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)p, wp->w_arg_idx_invalid ? "(%d) of %d)"
|
|
Karsten Hopp |
81c285 |
: "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 4218,4225 ----
|
|
Karsten Hopp |
81c285 |
STRCPY(p, "file ");
|
|
Karsten Hopp |
81c285 |
p += 5;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)p, (size_t)(buflen - (p - buf)),
|
|
Karsten Hopp |
81c285 |
! wp->w_arg_idx_invalid ? "(%d) of %d)"
|
|
Karsten Hopp |
81c285 |
: "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4996,5002 ****
|
|
Karsten Hopp |
81c285 |
if (tab != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
*tab++ = '\0';
|
|
Karsten Hopp |
81c285 |
! col = atoi((char *)tab);
|
|
Karsten Hopp |
81c285 |
tab = vim_strrchr(xline, '\t');
|
|
Karsten Hopp |
81c285 |
if (tab != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 5002,5008 ----
|
|
Karsten Hopp |
81c285 |
if (tab != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
*tab++ = '\0';
|
|
Karsten Hopp |
81c285 |
! col = (colnr_T)atoi((char *)tab);
|
|
Karsten Hopp |
81c285 |
tab = vim_strrchr(xline, '\t');
|
|
Karsten Hopp |
81c285 |
if (tab != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5034,5039 ****
|
|
Karsten Hopp |
81c285 |
--- 5040,5046 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
char_u *line;
|
|
Karsten Hopp |
81c285 |
int max_buffers;
|
|
Karsten Hopp |
81c285 |
+ size_t len;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (find_viminfo_parameter('%') == NULL)
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5042,5048 ****
|
|
Karsten Hopp |
81c285 |
max_buffers = get_viminfo_parameter('%');
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Allocate room for the file name, lnum and col. */
|
|
Karsten Hopp |
81c285 |
! line = alloc(MAXPATHL + 40);
|
|
Karsten Hopp |
81c285 |
if (line == NULL)
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 5049,5056 ----
|
|
Karsten Hopp |
81c285 |
max_buffers = get_viminfo_parameter('%');
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Allocate room for the file name, lnum and col. */
|
|
Karsten Hopp |
81c285 |
! #define LINE_BUF_LEN (MAXPATHL + 40)
|
|
Karsten Hopp |
81c285 |
! line = alloc(LINE_BUF_LEN);
|
|
Karsten Hopp |
81c285 |
if (line == NULL)
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5068,5074 ****
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
putc('%', fp);
|
|
Karsten Hopp |
81c285 |
home_replace(NULL, buf->b_ffname, line, MAXPATHL, TRUE);
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)line + STRLEN(line), "\t%ld\t%d",
|
|
Karsten Hopp |
81c285 |
(long)buf->b_last_cursor.lnum,
|
|
Karsten Hopp |
81c285 |
buf->b_last_cursor.col);
|
|
Karsten Hopp |
81c285 |
viminfo_writestring(fp, line);
|
|
Karsten Hopp |
81c285 |
--- 5076,5083 ----
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
putc('%', fp);
|
|
Karsten Hopp |
81c285 |
home_replace(NULL, buf->b_ffname, line, MAXPATHL, TRUE);
|
|
Karsten Hopp |
81c285 |
! len = STRLEN(line);
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)line + len, len - LINE_BUF_LEN, "\t%ld\t%d",
|
|
Karsten Hopp |
81c285 |
(long)buf->b_last_cursor.lnum,
|
|
Karsten Hopp |
81c285 |
buf->b_last_cursor.col);
|
|
Karsten Hopp |
81c285 |
viminfo_writestring(fp, line);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5226,5232 ****
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! int
|
|
Karsten Hopp |
81c285 |
buf_change_sign_type(buf, markId, typenr)
|
|
Karsten Hopp |
81c285 |
buf_T *buf; /* buffer to store sign in */
|
|
Karsten Hopp |
81c285 |
int markId; /* sign ID */
|
|
Karsten Hopp |
81c285 |
--- 5235,5241 ----
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! linenr_T
|
|
Karsten Hopp |
81c285 |
buf_change_sign_type(buf, markId, typenr)
|
|
Karsten Hopp |
81c285 |
buf_T *buf; /* buffer to store sign in */
|
|
Karsten Hopp |
81c285 |
int markId; /* sign ID */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5243,5252 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! return 0;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! int_u
|
|
Karsten Hopp |
81c285 |
buf_getsigntype(buf, lnum, type)
|
|
Karsten Hopp |
81c285 |
buf_T *buf;
|
|
Karsten Hopp |
81c285 |
linenr_T lnum;
|
|
Karsten Hopp |
81c285 |
--- 5252,5261 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! return (linenr_T)0;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! int
|
|
Karsten Hopp |
81c285 |
buf_getsigntype(buf, lnum, type)
|
|
Karsten Hopp |
81c285 |
buf_T *buf;
|
|
Karsten Hopp |
81c285 |
linenr_T lnum;
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/charset.c 2008-07-24 21:30:44.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/charset.c 2009-05-05 18:17:11.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 17,23 ****
|
|
Karsten Hopp |
81c285 |
static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! static int nr2hex __ARGS((int c));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static int chartab_initialized = FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 17,23 ----
|
|
Karsten Hopp |
81c285 |
static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! static unsigned nr2hex __ARGS((unsigned c));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static int chartab_initialized = FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 664,670 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
buf[++i] = nr2hex((unsigned)c >> 4);
|
|
Karsten Hopp |
81c285 |
! buf[++i] = nr2hex(c);
|
|
Karsten Hopp |
81c285 |
buf[++i] = '>';
|
|
Karsten Hopp |
81c285 |
buf[++i] = NUL;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 664,670 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
buf[++i] = nr2hex((unsigned)c >> 4);
|
|
Karsten Hopp |
81c285 |
! buf[++i] = nr2hex((unsigned)c);
|
|
Karsten Hopp |
81c285 |
buf[++i] = '>';
|
|
Karsten Hopp |
81c285 |
buf[++i] = NUL;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 674,682 ****
|
|
Karsten Hopp |
81c285 |
* Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
|
|
Karsten Hopp |
81c285 |
* function key 1.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! static int
|
|
Karsten Hopp |
81c285 |
nr2hex(c)
|
|
Karsten Hopp |
81c285 |
! int c;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if ((c & 0xf) <= 9)
|
|
Karsten Hopp |
81c285 |
return (c & 0xf) + '0';
|
|
Karsten Hopp |
81c285 |
--- 674,682 ----
|
|
Karsten Hopp |
81c285 |
* Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
|
|
Karsten Hopp |
81c285 |
* function key 1.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! static unsigned
|
|
Karsten Hopp |
81c285 |
nr2hex(c)
|
|
Karsten Hopp |
81c285 |
! unsigned c;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if ((c & 0xf) <= 9)
|
|
Karsten Hopp |
81c285 |
return (c & 0xf) + '0';
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 884,890 ****
|
|
Karsten Hopp |
81c285 |
if (c >= 0x100)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (enc_dbcs != 0)
|
|
Karsten Hopp |
81c285 |
! return dbcs_class((unsigned)c >> 8, c & 0xff) >= 2;
|
|
Karsten Hopp |
81c285 |
if (enc_utf8)
|
|
Karsten Hopp |
81c285 |
return utf_class(c) >= 2;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 884,890 ----
|
|
Karsten Hopp |
81c285 |
if (c >= 0x100)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (enc_dbcs != 0)
|
|
Karsten Hopp |
81c285 |
! return dbcs_class((unsigned)c >> 8, (unsigned)(c & 0xff)) >= 2;
|
|
Karsten Hopp |
81c285 |
if (enc_utf8)
|
|
Karsten Hopp |
81c285 |
return utf_class(c) >= 2;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1090,1096 ****
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
numberextra = win_col_off(wp);
|
|
Karsten Hopp |
81c285 |
col2 = col;
|
|
Karsten Hopp |
81c285 |
! colmax = W_WIDTH(wp) - numberextra;
|
|
Karsten Hopp |
81c285 |
if (col >= colmax)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
n = colmax + win_col_off2(wp);
|
|
Karsten Hopp |
81c285 |
--- 1090,1096 ----
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
numberextra = win_col_off(wp);
|
|
Karsten Hopp |
81c285 |
col2 = col;
|
|
Karsten Hopp |
81c285 |
! colmax = (colnr_T)(W_WIDTH(wp) - numberextra);
|
|
Karsten Hopp |
81c285 |
if (col >= colmax)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
n = colmax + win_col_off2(wp);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1201,1217 ****
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
colnr_T vcol;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! colnr_T width1; /* width of first line (after line number) */
|
|
Karsten Hopp |
81c285 |
! colnr_T width2; /* width of further lines */
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
81c285 |
if (wp->w_width == 0) /* there is no border */
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
width1 = W_WIDTH(wp) - win_col_off(wp);
|
|
Karsten Hopp |
81c285 |
! if (vcol < width1 - 1)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
! if (vcol == width1 - 1)
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
width2 = width1 + win_col_off2(wp);
|
|
Karsten Hopp |
81c285 |
return ((vcol - width1) % width2 == width2 - 1);
|
|
Karsten Hopp |
81c285 |
--- 1201,1217 ----
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
colnr_T vcol;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! int width1; /* width of first line (after line number) */
|
|
Karsten Hopp |
81c285 |
! int width2; /* width of further lines */
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
81c285 |
if (wp->w_width == 0) /* there is no border */
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
width1 = W_WIDTH(wp) - win_col_off(wp);
|
|
Karsten Hopp |
81c285 |
! if ((int)vcol < width1 - 1)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
! if ((int)vcol == width1 - 1)
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
width2 = width1 + win_col_off2(wp);
|
|
Karsten Hopp |
81c285 |
return ((vcol - width1) % width2 == width2 - 1);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1396,1408 ****
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
/* Cannot put the cursor on part of a wide character. */
|
|
Karsten Hopp |
81c285 |
ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
|
|
Karsten Hopp |
81c285 |
! if (pos->col < STRLEN(ptr))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int c = (*mb_ptr2char)(ptr + pos->col);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (c != TAB && vim_isprintc(c))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! endadd = char2cells(c) - 1;
|
|
Karsten Hopp |
81c285 |
if (coladd > endadd) /* past end of line */
|
|
Karsten Hopp |
81c285 |
endadd = 0;
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
--- 1396,1408 ----
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
/* Cannot put the cursor on part of a wide character. */
|
|
Karsten Hopp |
81c285 |
ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
|
|
Karsten Hopp |
81c285 |
! if (pos->col < (colnr_T)STRLEN(ptr))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int c = (*mb_ptr2char)(ptr + pos->col);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (c != TAB && vim_isprintc(c))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! endadd = (colnr_T)(char2cells(c) - 1);
|
|
Karsten Hopp |
81c285 |
if (coladd > endadd) /* past end of line */
|
|
Karsten Hopp |
81c285 |
endadd = 0;
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/cleanlint.vim 2009-05-13 12:08:12.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/cleanlint.vim 2009-05-05 21:34:01.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 0 ****
|
|
Karsten Hopp |
81c285 |
--- 1,27 ----
|
|
Karsten Hopp |
81c285 |
+ " Vim tool: Filter output of splint
|
|
Karsten Hopp |
81c285 |
+ "
|
|
Karsten Hopp |
81c285 |
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
Karsten Hopp |
81c285 |
+ " Last Change: 2009 May 05
|
|
Karsten Hopp |
81c285 |
+
|
|
Karsten Hopp |
81c285 |
+ " Usage: redirect output of "make lint" to a file, edit that file with Vim and
|
|
Karsten Hopp |
81c285 |
+ " :call CleanLint()
|
|
Karsten Hopp |
81c285 |
+ " This deletes irrelevant messages. What remains might be valid warnings.
|
|
Karsten Hopp |
81c285 |
+
|
|
Karsten Hopp |
81c285 |
+ fun! CleanLint()
|
|
Karsten Hopp |
81c285 |
+ g/^ Types are incompatible/lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Assignment of dev_t to __dev_t:/lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Assignment of __dev_t to dev_t:/lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Operands of == have incompatible types (__dev_t, dev_t): /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Operands of == have incompatible types (unsigned int, int): /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Assignment of char to char_u: /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Assignment of unsigned int to int: /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Assignment of colnr_T to int: /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Assignment of int to char_u: /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Function .* expects arg . to be wint_t gets int: /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/^digraph.c.*digraphdefault.*is type char, expects char_u:/lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/^digraph.c.*Additional initialization errors for digraphdefault not reported/lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/Function strncasecmp expects arg 3 to be int gets size_t: /lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/ To ignore signs in type comparisons use +ignoresigns/lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/ To allow arbitrary integral types to match any integral type, use +matchanyintegral./lockmarks d
|
|
Karsten Hopp |
81c285 |
+ g/ To allow arbitrary integral types to match long unsigned, use +longintegral./lockmarks d
|
|
Karsten Hopp |
81c285 |
+ endfun
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/digraph.c 2008-06-25 00:26:41.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/digraph.c 2009-05-05 20:32:43.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 32,38 ****
|
|
Karsten Hopp |
81c285 |
static void printdigraph __ARGS((digr_T *));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* digraphs added by the user */
|
|
Karsten Hopp |
81c285 |
! static garray_T user_digraphs = {0, 0, sizeof(digr_T), 10, NULL};
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Note: Characters marked with XX are not included literally, because some
|
|
Karsten Hopp |
81c285 |
--- 32,38 ----
|
|
Karsten Hopp |
81c285 |
static void printdigraph __ARGS((digr_T *));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* digraphs added by the user */
|
|
Karsten Hopp |
81c285 |
! static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Note: Characters marked with XX are not included literally, because some
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2371,2380 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
! *p++ = dp->result;
|
|
Karsten Hopp |
81c285 |
if (char2cells(dp->result) == 1)
|
|
Karsten Hopp |
81c285 |
*p++ = ' ';
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)p, " %3d", dp->result);
|
|
Karsten Hopp |
81c285 |
msg_outtrans(buf);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 2371,2380 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
! *p++ = (char_u)dp->result;
|
|
Karsten Hopp |
81c285 |
if (char2cells(dp->result) == 1)
|
|
Karsten Hopp |
81c285 |
*p++ = ' ';
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result);
|
|
Karsten Hopp |
81c285 |
msg_outtrans(buf);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2395,2401 ****
|
|
Karsten Hopp |
81c285 |
static void keymap_unload __ARGS((void));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
! * Set up key mapping tables for the 'keymap' option
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
keymap_init()
|
|
Karsten Hopp |
81c285 |
--- 2395,2404 ----
|
|
Karsten Hopp |
81c285 |
static void keymap_unload __ARGS((void));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
! * Set up key mapping tables for the 'keymap' option.
|
|
Karsten Hopp |
81c285 |
! * Returns NULL if OK, an error message for failure. This only needs to be
|
|
Karsten Hopp |
81c285 |
! * used when setting the option, not later when the value has already been
|
|
Karsten Hopp |
81c285 |
! * checked.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
keymap_init()
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2412,2436 ****
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *buf;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Source the keymap file. It will contain a ":loadkeymap" command
|
|
Karsten Hopp |
81c285 |
* which will call ex_loadkeymap() below. */
|
|
Karsten Hopp |
81c285 |
! buf = alloc((unsigned)(STRLEN(curbuf->b_p_keymap)
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
! + STRLEN(p_enc)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
! + 14));
|
|
Karsten Hopp |
81c285 |
if (buf == NULL)
|
|
Karsten Hopp |
81c285 |
return e_outofmem;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
/* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buf, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc);
|
|
Karsten Hopp |
81c285 |
if (source_runtime(buf, FALSE) == FAIL)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* try finding "keymap/'keymap'.vim" in 'runtimepath' */
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buf, "keymap/%s.vim", curbuf->b_p_keymap);
|
|
Karsten Hopp |
81c285 |
if (source_runtime(buf, FALSE) == FAIL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
vim_free(buf);
|
|
Karsten Hopp |
81c285 |
--- 2415,2443 ----
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *buf;
|
|
Karsten Hopp |
81c285 |
+ size_t buflen;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Source the keymap file. It will contain a ":loadkeymap" command
|
|
Karsten Hopp |
81c285 |
* which will call ex_loadkeymap() below. */
|
|
Karsten Hopp |
81c285 |
! buflen = STRLEN(curbuf->b_p_keymap)
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
! + STRLEN(p_enc)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
! + 14;
|
|
Karsten Hopp |
81c285 |
! buf = alloc((unsigned)buflen);
|
|
Karsten Hopp |
81c285 |
if (buf == NULL)
|
|
Karsten Hopp |
81c285 |
return e_outofmem;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
/* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
|
|
Karsten Hopp |
81c285 |
! curbuf->b_p_keymap, p_enc);
|
|
Karsten Hopp |
81c285 |
if (source_runtime(buf, FALSE) == FAIL)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* try finding "keymap/'keymap'.vim" in 'runtimepath' */
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
|
|
Karsten Hopp |
81c285 |
! curbuf->b_p_keymap);
|
|
Karsten Hopp |
81c285 |
if (source_runtime(buf, FALSE) == FAIL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
vim_free(buf);
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/edit.c 2009-02-21 20:27:00.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/edit.c 2009-05-05 21:14:50.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 57,63 ****
|
|
Karsten Hopp |
81c285 |
N_(" Keyword Local completion (^N^P)"),
|
|
Karsten Hopp |
81c285 |
};
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! static char_u e_hitend[] = N_("Hit end of paragraph");
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Structure used to store one match for insert completion.
|
|
Karsten Hopp |
81c285 |
--- 57,63 ----
|
|
Karsten Hopp |
81c285 |
N_(" Keyword Local completion (^N^P)"),
|
|
Karsten Hopp |
81c285 |
};
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! static char e_hitend[] = N_("Hit end of paragraph");
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Structure used to store one match for insert completion.
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 69,75 ****
|
|
Karsten Hopp |
81c285 |
--- 69,79 ----
|
|
Karsten Hopp |
81c285 |
compl_T *cp_prev;
|
|
Karsten Hopp |
81c285 |
char_u *cp_str; /* matched text */
|
|
Karsten Hopp |
81c285 |
char cp_icase; /* TRUE or FALSE: ignore case */
|
|
Karsten Hopp |
81c285 |
+ #ifdef S_SPLINT_S /* splint can't handle array of pointers */
|
|
Karsten Hopp |
81c285 |
+ char_u **cp_text; /* text for the menu */
|
|
Karsten Hopp |
81c285 |
+ #else
|
|
Karsten Hopp |
81c285 |
char_u *(cp_text[CPT_COUNT]); /* text for the menu */
|
|
Karsten Hopp |
81c285 |
+ #endif
|
|
Karsten Hopp |
81c285 |
char_u *cp_fname; /* file containing the match, allocated when
|
|
Karsten Hopp |
81c285 |
* cp_flags has FREE_FNAME */
|
|
Karsten Hopp |
81c285 |
int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 306,312 ****
|
|
Karsten Hopp |
81c285 |
int c = 0;
|
|
Karsten Hopp |
81c285 |
char_u *ptr;
|
|
Karsten Hopp |
81c285 |
int lastc;
|
|
Karsten Hopp |
81c285 |
! colnr_T mincol;
|
|
Karsten Hopp |
81c285 |
static linenr_T o_lnum = 0;
|
|
Karsten Hopp |
81c285 |
int i;
|
|
Karsten Hopp |
81c285 |
int did_backspace = TRUE; /* previous char was backspace */
|
|
Karsten Hopp |
81c285 |
--- 310,316 ----
|
|
Karsten Hopp |
81c285 |
int c = 0;
|
|
Karsten Hopp |
81c285 |
char_u *ptr;
|
|
Karsten Hopp |
81c285 |
int lastc;
|
|
Karsten Hopp |
81c285 |
! int mincol;
|
|
Karsten Hopp |
81c285 |
static linenr_T o_lnum = 0;
|
|
Karsten Hopp |
81c285 |
int i;
|
|
Karsten Hopp |
81c285 |
int did_backspace = TRUE; /* previous char was backspace */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 387,393 ****
|
|
Karsten Hopp |
81c285 |
if (startln)
|
|
Karsten Hopp |
81c285 |
Insstart.col = 0;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! Insstart_textlen = linetabsize(ml_get_curline());
|
|
Karsten Hopp |
81c285 |
Insstart_blank_vcol = MAXCOL;
|
|
Karsten Hopp |
81c285 |
if (!did_ai)
|
|
Karsten Hopp |
81c285 |
ai_col = 0;
|
|
Karsten Hopp |
81c285 |
--- 391,397 ----
|
|
Karsten Hopp |
81c285 |
if (startln)
|
|
Karsten Hopp |
81c285 |
Insstart.col = 0;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
|
|
Karsten Hopp |
81c285 |
Insstart_blank_vcol = MAXCOL;
|
|
Karsten Hopp |
81c285 |
if (!did_ai)
|
|
Karsten Hopp |
81c285 |
ai_col = 0;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 653,659 ****
|
|
Karsten Hopp |
81c285 |
mincol = curwin->w_wcol;
|
|
Karsten Hopp |
81c285 |
validate_cursor_col();
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! if ((int)curwin->w_wcol < (int)mincol - curbuf->b_p_ts
|
|
Karsten Hopp |
81c285 |
&& curwin->w_wrow == W_WINROW(curwin)
|
|
Karsten Hopp |
81c285 |
+ curwin->w_height - 1 - p_so
|
|
Karsten Hopp |
81c285 |
&& (curwin->w_cursor.lnum != curwin->w_topline
|
|
Karsten Hopp |
81c285 |
--- 657,663 ----
|
|
Karsten Hopp |
81c285 |
mincol = curwin->w_wcol;
|
|
Karsten Hopp |
81c285 |
validate_cursor_col();
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! if ((int)curwin->w_wcol < mincol - curbuf->b_p_ts
|
|
Karsten Hopp |
81c285 |
&& curwin->w_wrow == W_WINROW(curwin)
|
|
Karsten Hopp |
81c285 |
+ curwin->w_height - 1 - p_so
|
|
Karsten Hopp |
81c285 |
&& (curwin->w_cursor.lnum != curwin->w_topline
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1773,1779 ****
|
|
Karsten Hopp |
81c285 |
* Compute the screen column where the cursor should be.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
vcol = get_indent() - vcol;
|
|
Karsten Hopp |
81c285 |
! curwin->w_virtcol = (vcol < 0) ? 0 : vcol;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Advance the cursor until we reach the right screen column.
|
|
Karsten Hopp |
81c285 |
--- 1777,1783 ----
|
|
Karsten Hopp |
81c285 |
* Compute the screen column where the cursor should be.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
vcol = get_indent() - vcol;
|
|
Karsten Hopp |
81c285 |
! curwin->w_virtcol = (colnr_T)((vcol < 0) ? 0 : vcol);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Advance the cursor until we reach the right screen column.
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1800,1808 ****
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
if (vcol != (int)curwin->w_virtcol)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! curwin->w_cursor.col = new_cursor_col;
|
|
Karsten Hopp |
81c285 |
i = (int)curwin->w_virtcol - vcol;
|
|
Karsten Hopp |
81c285 |
! ptr = alloc(i + 1);
|
|
Karsten Hopp |
81c285 |
if (ptr != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
new_cursor_col += i;
|
|
Karsten Hopp |
81c285 |
--- 1804,1812 ----
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
if (vcol != (int)curwin->w_virtcol)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! curwin->w_cursor.col = (colnr_T)new_cursor_col;
|
|
Karsten Hopp |
81c285 |
i = (int)curwin->w_virtcol - vcol;
|
|
Karsten Hopp |
81c285 |
! ptr = alloc((unsigned)(i + 1));
|
|
Karsten Hopp |
81c285 |
if (ptr != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
new_cursor_col += i;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1826,1832 ****
|
|
Karsten Hopp |
81c285 |
if (new_cursor_col <= 0)
|
|
Karsten Hopp |
81c285 |
curwin->w_cursor.col = 0;
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! curwin->w_cursor.col = new_cursor_col;
|
|
Karsten Hopp |
81c285 |
curwin->w_set_curswant = TRUE;
|
|
Karsten Hopp |
81c285 |
changed_cline_bef_curs();
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 1830,1836 ----
|
|
Karsten Hopp |
81c285 |
if (new_cursor_col <= 0)
|
|
Karsten Hopp |
81c285 |
curwin->w_cursor.col = 0;
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! curwin->w_cursor.col = (colnr_T)new_cursor_col;
|
|
Karsten Hopp |
81c285 |
curwin->w_set_curswant = TRUE;
|
|
Karsten Hopp |
81c285 |
changed_cline_bef_curs();
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1966,1972 ****
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
if (enc_utf8 && limit_col >= 0)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! int ecol = curwin->w_cursor.col + 1;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Make sure the cursor is at the start of a character, but
|
|
Karsten Hopp |
81c285 |
* skip forward again when going too far back because of a
|
|
Karsten Hopp |
81c285 |
--- 1970,1976 ----
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
if (enc_utf8 && limit_col >= 0)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! colnr_T ecol = curwin->w_cursor.col + 1;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Make sure the cursor is at the start of a character, but
|
|
Karsten Hopp |
81c285 |
* skip forward again when going too far back because of a
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1982,1988 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
! del_bytes((long)(ecol - curwin->w_cursor.col), FALSE, TRUE);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
--- 1986,1992 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
! del_bytes((long)((int)ecol - curwin->w_cursor.col), FALSE, TRUE);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2201,2207 ****
|
|
Karsten Hopp |
81c285 |
actual_compl_length = compl_length;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Allocate wide character array for the completion and fill it. */
|
|
Karsten Hopp |
81c285 |
! wca = (int *)alloc(actual_len * sizeof(int));
|
|
Karsten Hopp |
81c285 |
if (wca != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
p = str;
|
|
Karsten Hopp |
81c285 |
--- 2205,2211 ----
|
|
Karsten Hopp |
81c285 |
actual_compl_length = compl_length;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Allocate wide character array for the completion and fill it. */
|
|
Karsten Hopp |
81c285 |
! wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
|
|
Karsten Hopp |
81c285 |
if (wca != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
p = str;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2580,2586 ****
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
set_completion(startcol, list)
|
|
Karsten Hopp |
81c285 |
! int startcol;
|
|
Karsten Hopp |
81c285 |
list_T *list;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* If already doing completions stop it. */
|
|
Karsten Hopp |
81c285 |
--- 2584,2590 ----
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
set_completion(startcol, list)
|
|
Karsten Hopp |
81c285 |
! colnr_T startcol;
|
|
Karsten Hopp |
81c285 |
list_T *list;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* If already doing completions stop it. */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2591,2600 ****
|
|
Karsten Hopp |
81c285 |
if (stop_arrow() == FAIL)
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! if (startcol > (int)curwin->w_cursor.col)
|
|
Karsten Hopp |
81c285 |
startcol = curwin->w_cursor.col;
|
|
Karsten Hopp |
81c285 |
compl_col = startcol;
|
|
Karsten Hopp |
81c285 |
! compl_length = curwin->w_cursor.col - startcol;
|
|
Karsten Hopp |
81c285 |
/* compl_pattern doesn't need to be set */
|
|
Karsten Hopp |
81c285 |
compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
|
|
Karsten Hopp |
81c285 |
if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
|
|
Karsten Hopp |
81c285 |
--- 2595,2604 ----
|
|
Karsten Hopp |
81c285 |
if (stop_arrow() == FAIL)
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! if (startcol > curwin->w_cursor.col)
|
|
Karsten Hopp |
81c285 |
startcol = curwin->w_cursor.col;
|
|
Karsten Hopp |
81c285 |
compl_col = startcol;
|
|
Karsten Hopp |
81c285 |
! compl_length = (int)curwin->w_cursor.col - (int)startcol;
|
|
Karsten Hopp |
81c285 |
/* compl_pattern doesn't need to be set */
|
|
Karsten Hopp |
81c285 |
compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
|
|
Karsten Hopp |
81c285 |
if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2860,2866 ****
|
|
Karsten Hopp |
81c285 |
regmatch_T regmatch;
|
|
Karsten Hopp |
81c285 |
char_u **files;
|
|
Karsten Hopp |
81c285 |
int count;
|
|
Karsten Hopp |
81c285 |
- int i;
|
|
Karsten Hopp |
81c285 |
int save_p_scs;
|
|
Karsten Hopp |
81c285 |
int dir = compl_direction;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 2864,2869 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2892,2908 ****
|
|
Karsten Hopp |
81c285 |
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (pat_esc == NULL)
|
|
Karsten Hopp |
81c285 |
goto theend;
|
|
Karsten Hopp |
81c285 |
! i = (int)STRLEN(pat_esc) + 10;
|
|
Karsten Hopp |
81c285 |
! ptr = alloc(i);
|
|
Karsten Hopp |
81c285 |
if (ptr == NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
vim_free(pat_esc);
|
|
Karsten Hopp |
81c285 |
goto theend;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
|
|
Karsten Hopp |
81c285 |
regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
|
|
Karsten Hopp |
81c285 |
vim_free(pat_esc);
|
|
Karsten Hopp |
81c285 |
vim_free(ptr);
|
|
Karsten Hopp |
81c285 |
--- 2895,2912 ----
|
|
Karsten Hopp |
81c285 |
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
|
|
Karsten Hopp |
81c285 |
+ size_t len;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (pat_esc == NULL)
|
|
Karsten Hopp |
81c285 |
goto theend;
|
|
Karsten Hopp |
81c285 |
! len = STRLEN(pat_esc) + 10;
|
|
Karsten Hopp |
81c285 |
! ptr = alloc((unsigned)len);
|
|
Karsten Hopp |
81c285 |
if (ptr == NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
vim_free(pat_esc);
|
|
Karsten Hopp |
81c285 |
goto theend;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
|
|
Karsten Hopp |
81c285 |
regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
|
|
Karsten Hopp |
81c285 |
vim_free(pat_esc);
|
|
Karsten Hopp |
81c285 |
vim_free(ptr);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2993,2999 ****
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
vim_snprintf((char *)IObuff, IOSIZE,
|
|
Karsten Hopp |
81c285 |
_("Scanning dictionary: %s"), (char *)files[i]);
|
|
Karsten Hopp |
81c285 |
! msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (fp != NULL)
|
|
Karsten Hopp |
81c285 |
--- 2997,3003 ----
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
vim_snprintf((char *)IObuff, IOSIZE,
|
|
Karsten Hopp |
81c285 |
_("Scanning dictionary: %s"), (char *)files[i]);
|
|
Karsten Hopp |
81c285 |
! (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (fp != NULL)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3311,3317 ****
|
|
Karsten Hopp |
81c285 |
static int
|
|
Karsten Hopp |
81c285 |
ins_compl_len()
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! int off = curwin->w_cursor.col - compl_col;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (off < 0)
|
|
Karsten Hopp |
81c285 |
return 0;
|
|
Karsten Hopp |
81c285 |
--- 3315,3321 ----
|
|
Karsten Hopp |
81c285 |
static int
|
|
Karsten Hopp |
81c285 |
ins_compl_len()
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! int off = (int)curwin->w_cursor.col - (int)compl_col;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (off < 0)
|
|
Karsten Hopp |
81c285 |
return 0;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3347,3353 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
vim_free(compl_leader);
|
|
Karsten Hopp |
81c285 |
compl_leader = vim_strnsave(ml_get_curline() + compl_col,
|
|
Karsten Hopp |
81c285 |
! curwin->w_cursor.col - compl_col);
|
|
Karsten Hopp |
81c285 |
if (compl_leader != NULL)
|
|
Karsten Hopp |
81c285 |
ins_compl_new_leader();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 3351,3357 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
vim_free(compl_leader);
|
|
Karsten Hopp |
81c285 |
compl_leader = vim_strnsave(ml_get_curline() + compl_col,
|
|
Karsten Hopp |
81c285 |
! (int)(curwin->w_cursor.col - compl_col));
|
|
Karsten Hopp |
81c285 |
if (compl_leader != NULL)
|
|
Karsten Hopp |
81c285 |
ins_compl_new_leader();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3395,3401 ****
|
|
Karsten Hopp |
81c285 |
ins_compl_addfrommatch()
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *p;
|
|
Karsten Hopp |
81c285 |
! int len = curwin->w_cursor.col - compl_col;
|
|
Karsten Hopp |
81c285 |
int c;
|
|
Karsten Hopp |
81c285 |
compl_T *cp;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 3399,3405 ----
|
|
Karsten Hopp |
81c285 |
ins_compl_addfrommatch()
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *p;
|
|
Karsten Hopp |
81c285 |
! int len = (int)curwin->w_cursor.col - (int)compl_col;
|
|
Karsten Hopp |
81c285 |
int c;
|
|
Karsten Hopp |
81c285 |
compl_T *cp;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3961,3967 ****
|
|
Karsten Hopp |
81c285 |
: ins_buf->b_sfname == NULL
|
|
Karsten Hopp |
81c285 |
? (char *)ins_buf->b_fname
|
|
Karsten Hopp |
81c285 |
: (char *)ins_buf->b_sfname);
|
|
Karsten Hopp |
81c285 |
! msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else if (*e_cpt == NUL)
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
--- 3965,3971 ----
|
|
Karsten Hopp |
81c285 |
: ins_buf->b_sfname == NULL
|
|
Karsten Hopp |
81c285 |
? (char *)ins_buf->b_fname
|
|
Karsten Hopp |
81c285 |
: (char *)ins_buf->b_sfname);
|
|
Karsten Hopp |
81c285 |
! (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else if (*e_cpt == NUL)
|
|
Karsten Hopp |
81c285 |
break;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3991,3997 ****
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
type = CTRL_X_TAGS;
|
|
Karsten Hopp |
81c285 |
sprintf((char*)IObuff, _("Scanning tags."));
|
|
Karsten Hopp |
81c285 |
! msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
type = -1;
|
|
Karsten Hopp |
81c285 |
--- 3995,4001 ----
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
type = CTRL_X_TAGS;
|
|
Karsten Hopp |
81c285 |
sprintf((char*)IObuff, _("Scanning tags."));
|
|
Karsten Hopp |
81c285 |
! (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
type = -1;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6320,6326 ****
|
|
Karsten Hopp |
81c285 |
ins_need_undo = FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
Insstart = curwin->w_cursor; /* new insertion starts here */
|
|
Karsten Hopp |
81c285 |
! Insstart_textlen = linetabsize(ml_get_curline());
|
|
Karsten Hopp |
81c285 |
ai_col = 0;
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VREPLACE
|
|
Karsten Hopp |
81c285 |
if (State & VREPLACE_FLAG)
|
|
Karsten Hopp |
81c285 |
--- 6324,6330 ----
|
|
Karsten Hopp |
81c285 |
ins_need_undo = FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
Insstart = curwin->w_cursor; /* new insertion starts here */
|
|
Karsten Hopp |
81c285 |
! Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
|
|
Karsten Hopp |
81c285 |
ai_col = 0;
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VREPLACE
|
|
Karsten Hopp |
81c285 |
if (State & VREPLACE_FLAG)
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/ex_cmds.c 2009-04-29 18:44:38.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/ex_cmds.c 2009-05-05 17:55:40.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1789,1795 ****
|
|
Karsten Hopp |
81c285 |
* overwrite a user's viminfo file after a "su root", with a
|
|
Karsten Hopp |
81c285 |
* viminfo file that the user can't read.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! st_old.st_dev = 0;
|
|
Karsten Hopp |
81c285 |
st_old.st_ino = 0;
|
|
Karsten Hopp |
81c285 |
st_old.st_mode = 0600;
|
|
Karsten Hopp |
81c285 |
if (mch_stat((char *)fname, &st_old) == 0
|
|
Karsten Hopp |
81c285 |
--- 1789,1795 ----
|
|
Karsten Hopp |
81c285 |
* overwrite a user's viminfo file after a "su root", with a
|
|
Karsten Hopp |
81c285 |
* viminfo file that the user can't read.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! st_old.st_dev = (dev_t)0;
|
|
Karsten Hopp |
81c285 |
st_old.st_ino = 0;
|
|
Karsten Hopp |
81c285 |
st_old.st_mode = 0600;
|
|
Karsten Hopp |
81c285 |
if (mch_stat((char *)fname, &st_old) == 0
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3715,3721 ****
|
|
Karsten Hopp |
81c285 |
/* If the window options were changed may need to set the spell language.
|
|
Karsten Hopp |
81c285 |
* Can only do this after the buffer has been properly setup. */
|
|
Karsten Hopp |
81c285 |
if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
|
|
Karsten Hopp |
81c285 |
! did_set_spelllang(curbuf);
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (command == NULL)
|
|
Karsten Hopp |
81c285 |
--- 3715,3721 ----
|
|
Karsten Hopp |
81c285 |
/* If the window options were changed may need to set the spell language.
|
|
Karsten Hopp |
81c285 |
* Can only do this after the buffer has been properly setup. */
|
|
Karsten Hopp |
81c285 |
if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
|
|
Karsten Hopp |
81c285 |
! (void)did_set_spelllang(curbuf);
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (command == NULL)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3788,3794 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_KEYMAP
|
|
Karsten Hopp |
81c285 |
if (curbuf->b_kmap_state & KEYMAP_INIT)
|
|
Karsten Hopp |
81c285 |
! keymap_init();
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--RedrawingDisabled;
|
|
Karsten Hopp |
81c285 |
--- 3788,3794 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_KEYMAP
|
|
Karsten Hopp |
81c285 |
if (curbuf->b_kmap_state & KEYMAP_INIT)
|
|
Karsten Hopp |
81c285 |
! (void)keymap_init();
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--RedrawingDisabled;
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/globals.h 2009-03-05 03:13:51.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/globals.h 2009-05-09 21:14:49.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 524,530 ****
|
|
Karsten Hopp |
81c285 |
EXTERN win_T *prevwin INIT(= NULL); /* previous window */
|
|
Karsten Hopp |
81c285 |
# define W_NEXT(wp) ((wp)->w_next)
|
|
Karsten Hopp |
81c285 |
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
81c285 |
! #define FOR_ALL_TAB_WINDOWS(tp, wp) \
|
|
Karsten Hopp |
81c285 |
for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
|
|
Karsten Hopp |
81c285 |
for ((wp) = ((tp) == curtab) \
|
|
Karsten Hopp |
81c285 |
? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
|
|
Karsten Hopp |
81c285 |
--- 524,530 ----
|
|
Karsten Hopp |
81c285 |
EXTERN win_T *prevwin INIT(= NULL); /* previous window */
|
|
Karsten Hopp |
81c285 |
# define W_NEXT(wp) ((wp)->w_next)
|
|
Karsten Hopp |
81c285 |
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
81c285 |
! # define FOR_ALL_TAB_WINDOWS(tp, wp) \
|
|
Karsten Hopp |
81c285 |
for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
|
|
Karsten Hopp |
81c285 |
for ((wp) = ((tp) == curtab) \
|
|
Karsten Hopp |
81c285 |
? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 718,724 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
EXTERN pos_T saved_cursor /* w_cursor before formatting text. */
|
|
Karsten Hopp |
81c285 |
# ifdef DO_INIT
|
|
Karsten Hopp |
81c285 |
! = INIT_POS_T
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 718,724 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
EXTERN pos_T saved_cursor /* w_cursor before formatting text. */
|
|
Karsten Hopp |
81c285 |
# ifdef DO_INIT
|
|
Karsten Hopp |
81c285 |
! = INIT_POS_T(0, 0, 0)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1039,1045 ****
|
|
Karsten Hopp |
81c285 |
EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
|
|
Karsten Hopp |
81c285 |
EXTERN pos_T last_cursormoved /* for CursorMoved event */
|
|
Karsten Hopp |
81c285 |
# ifdef DO_INIT
|
|
Karsten Hopp |
81c285 |
! = INIT_POS_T
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
;
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
--- 1039,1045 ----
|
|
Karsten Hopp |
81c285 |
EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
|
|
Karsten Hopp |
81c285 |
EXTERN pos_T last_cursormoved /* for CursorMoved event */
|
|
Karsten Hopp |
81c285 |
# ifdef DO_INIT
|
|
Karsten Hopp |
81c285 |
! = INIT_POS_T(0, 0, 0)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
;
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/ops.c 2009-04-29 17:39:17.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/ops.c 2009-05-13 12:41:02.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6400,6406 ****
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
|
|
Karsten Hopp |
81c285 |
&max_pos.col);
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buf1, _("%ld Cols; "),
|
|
Karsten Hopp |
81c285 |
(long)(oparg.end_vcol - oparg.start_vcol + 1));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
--- 6400,6406 ----
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
|
|
Karsten Hopp |
81c285 |
&max_pos.col);
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
|
|
Karsten Hopp |
81c285 |
(long)(oparg.end_vcol - oparg.start_vcol + 1));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6408,6420 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (char_count_cursor == byte_count_cursor
|
|
Karsten Hopp |
81c285 |
&& char_count == byte_count)
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
|
|
Karsten Hopp |
81c285 |
buf1, line_count_selected,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
word_count_cursor, word_count,
|
|
Karsten Hopp |
81c285 |
byte_count_cursor, byte_count);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
|
|
Karsten Hopp |
81c285 |
buf1, line_count_selected,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
word_count_cursor, word_count,
|
|
Karsten Hopp |
81c285 |
--- 6408,6422 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (char_count_cursor == byte_count_cursor
|
|
Karsten Hopp |
81c285 |
&& char_count == byte_count)
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)IObuff, IOSIZE,
|
|
Karsten Hopp |
81c285 |
! _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
|
|
Karsten Hopp |
81c285 |
buf1, line_count_selected,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
word_count_cursor, word_count,
|
|
Karsten Hopp |
81c285 |
byte_count_cursor, byte_count);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)IObuff, IOSIZE,
|
|
Karsten Hopp |
81c285 |
! _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
|
|
Karsten Hopp |
81c285 |
buf1, line_count_selected,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
word_count_cursor, word_count,
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6426,6445 ****
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
p = ml_get_curline();
|
|
Karsten Hopp |
81c285 |
validate_virtcol();
|
|
Karsten Hopp |
81c285 |
! col_print(buf1, (int)curwin->w_cursor.col + 1,
|
|
Karsten Hopp |
81c285 |
(int)curwin->w_virtcol + 1);
|
|
Karsten Hopp |
81c285 |
! col_print(buf2, (int)STRLEN(p), linetabsize(p));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (char_count_cursor == byte_count_cursor
|
|
Karsten Hopp |
81c285 |
&& char_count == byte_count)
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
|
|
Karsten Hopp |
81c285 |
(char *)buf1, (char *)buf2,
|
|
Karsten Hopp |
81c285 |
(long)curwin->w_cursor.lnum,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
word_count_cursor, word_count,
|
|
Karsten Hopp |
81c285 |
byte_count_cursor, byte_count);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
|
|
Karsten Hopp |
81c285 |
(char *)buf1, (char *)buf2,
|
|
Karsten Hopp |
81c285 |
(long)curwin->w_cursor.lnum,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
--- 6428,6449 ----
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
p = ml_get_curline();
|
|
Karsten Hopp |
81c285 |
validate_virtcol();
|
|
Karsten Hopp |
81c285 |
! col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
|
|
Karsten Hopp |
81c285 |
(int)curwin->w_virtcol + 1);
|
|
Karsten Hopp |
81c285 |
! col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p));
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (char_count_cursor == byte_count_cursor
|
|
Karsten Hopp |
81c285 |
&& char_count == byte_count)
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)IObuff, IOSIZE,
|
|
Karsten Hopp |
81c285 |
! _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
|
|
Karsten Hopp |
81c285 |
(char *)buf1, (char *)buf2,
|
|
Karsten Hopp |
81c285 |
(long)curwin->w_cursor.lnum,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
word_count_cursor, word_count,
|
|
Karsten Hopp |
81c285 |
byte_count_cursor, byte_count);
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)IObuff, IOSIZE,
|
|
Karsten Hopp |
81c285 |
! _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
|
|
Karsten Hopp |
81c285 |
(char *)buf1, (char *)buf2,
|
|
Karsten Hopp |
81c285 |
(long)curwin->w_cursor.lnum,
|
|
Karsten Hopp |
81c285 |
(long)curbuf->b_ml.ml_line_count,
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/os_unix.c 2009-03-02 02:44:54.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/os_unix.c 2009-05-05 17:35:58.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 199,205 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifndef SIG_ERR
|
|
Karsten Hopp |
81c285 |
! # define SIG_ERR ((RETSIGTYPE (*)())-1)
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* volatile because it is used in signal handler sig_winch(). */
|
|
Karsten Hopp |
81c285 |
--- 199,207 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifndef SIG_ERR
|
|
Karsten Hopp |
81c285 |
! # ifndef S_SPLINT_S
|
|
Karsten Hopp |
81c285 |
! # define SIG_ERR ((RETSIGTYPE (*)())-1)
|
|
Karsten Hopp |
81c285 |
! # endif
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* volatile because it is used in signal handler sig_winch(). */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 441,447 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(HAVE_TOTAL_MEM) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_SYS_RESOURCE_H
|
|
Karsten Hopp |
81c285 |
! # include <sys/resource.h>
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
# if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
|
|
Karsten Hopp |
81c285 |
# include <sys/sysctl.h>
|
|
Karsten Hopp |
81c285 |
--- 443,451 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(HAVE_TOTAL_MEM) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_SYS_RESOURCE_H
|
|
Karsten Hopp |
81c285 |
! # ifndef S_SPLINT_S /* splint crashes on bits/resource.h */
|
|
Karsten Hopp |
81c285 |
! # include <sys/resource.h>
|
|
Karsten Hopp |
81c285 |
! # endif
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
# if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
|
|
Karsten Hopp |
81c285 |
# include <sys/sysctl.h>
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/os_unix.h 2008-06-20 18:06:36.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/os_unix.h 2009-05-05 17:07:45.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 53,59 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_UNISTD_H
|
|
Karsten Hopp |
81c285 |
! # include <unistd.h>
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_LIBC_H
|
|
Karsten Hopp |
81c285 |
--- 53,61 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_UNISTD_H
|
|
Karsten Hopp |
81c285 |
! # ifndef S_SPLINT_S /* splint crashes on bits/confname.h */
|
|
Karsten Hopp |
81c285 |
! # include <unistd.h>
|
|
Karsten Hopp |
81c285 |
! # endif
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_LIBC_H
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/proto/buffer.pro 2008-11-15 14:10:23.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/proto/buffer.pro 2009-05-13 12:23:41.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 37,49 ****
|
|
Karsten Hopp |
81c285 |
int otherfile __ARGS((char_u *ffname));
|
|
Karsten Hopp |
81c285 |
void buf_setino __ARGS((buf_T *buf));
|
|
Karsten Hopp |
81c285 |
void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
|
|
Karsten Hopp |
81c285 |
! void col_print __ARGS((char_u *buf, int col, int vcol));
|
|
Karsten Hopp |
81c285 |
void maketitle __ARGS((void));
|
|
Karsten Hopp |
81c285 |
void resettitle __ARGS((void));
|
|
Karsten Hopp |
81c285 |
void free_titles __ARGS((void));
|
|
Karsten Hopp |
81c285 |
int build_stl_str_hl __ARGS((win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab));
|
|
Karsten Hopp |
81c285 |
! void get_rel_pos __ARGS((win_T *wp, char_u *str));
|
|
Karsten Hopp |
81c285 |
! int append_arg_number __ARGS((win_T *wp, char_u *buf, int add_file, int maxlen));
|
|
Karsten Hopp |
81c285 |
char_u *fix_fname __ARGS((char_u *fname));
|
|
Karsten Hopp |
81c285 |
void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
|
|
Karsten Hopp |
81c285 |
char_u *alist_name __ARGS((aentry_T *aep));
|
|
Karsten Hopp |
81c285 |
--- 37,48 ----
|
|
Karsten Hopp |
81c285 |
int otherfile __ARGS((char_u *ffname));
|
|
Karsten Hopp |
81c285 |
void buf_setino __ARGS((buf_T *buf));
|
|
Karsten Hopp |
81c285 |
void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
|
|
Karsten Hopp |
81c285 |
! void col_print __ARGS((char_u *buf, size_t buflen, int col, int vcol));
|
|
Karsten Hopp |
81c285 |
void maketitle __ARGS((void));
|
|
Karsten Hopp |
81c285 |
void resettitle __ARGS((void));
|
|
Karsten Hopp |
81c285 |
void free_titles __ARGS((void));
|
|
Karsten Hopp |
81c285 |
int build_stl_str_hl __ARGS((win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab));
|
|
Karsten Hopp |
81c285 |
! void get_rel_pos __ARGS((win_T *wp, char_u *buf, int buflen));
|
|
Karsten Hopp |
81c285 |
char_u *fix_fname __ARGS((char_u *fname));
|
|
Karsten Hopp |
81c285 |
void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
|
|
Karsten Hopp |
81c285 |
char_u *alist_name __ARGS((aentry_T *aep));
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 54,61 ****
|
|
Karsten Hopp |
81c285 |
void write_viminfo_bufferlist __ARGS((FILE *fp));
|
|
Karsten Hopp |
81c285 |
char *buf_spname __ARGS((buf_T *buf));
|
|
Karsten Hopp |
81c285 |
void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
|
|
Karsten Hopp |
81c285 |
! int buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
|
|
Karsten Hopp |
81c285 |
! int_u buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
|
|
Karsten Hopp |
81c285 |
linenr_T buf_delsign __ARGS((buf_T *buf, int id));
|
|
Karsten Hopp |
81c285 |
int buf_findsign __ARGS((buf_T *buf, int id));
|
|
Karsten Hopp |
81c285 |
int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
|
|
Karsten Hopp |
81c285 |
--- 53,60 ----
|
|
Karsten Hopp |
81c285 |
void write_viminfo_bufferlist __ARGS((FILE *fp));
|
|
Karsten Hopp |
81c285 |
char *buf_spname __ARGS((buf_T *buf));
|
|
Karsten Hopp |
81c285 |
void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
|
|
Karsten Hopp |
81c285 |
! linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
|
|
Karsten Hopp |
81c285 |
! int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
|
|
Karsten Hopp |
81c285 |
linenr_T buf_delsign __ARGS((buf_T *buf, int id));
|
|
Karsten Hopp |
81c285 |
int buf_findsign __ARGS((buf_T *buf, int id));
|
|
Karsten Hopp |
81c285 |
int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/proto/edit.pro 2008-01-16 20:03:13.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/proto/edit.pro 2009-05-05 20:51:56.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 8,14 ****
|
|
Karsten Hopp |
81c285 |
void backspace_until_column __ARGS((int col));
|
|
Karsten Hopp |
81c285 |
int vim_is_ctrl_x_key __ARGS((int c));
|
|
Karsten Hopp |
81c285 |
int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
|
|
Karsten Hopp |
81c285 |
! void set_completion __ARGS((int startcol, list_T *list));
|
|
Karsten Hopp |
81c285 |
void ins_compl_show_pum __ARGS((void));
|
|
Karsten Hopp |
81c285 |
char_u *find_word_start __ARGS((char_u *ptr));
|
|
Karsten Hopp |
81c285 |
char_u *find_word_end __ARGS((char_u *ptr));
|
|
Karsten Hopp |
81c285 |
--- 8,14 ----
|
|
Karsten Hopp |
81c285 |
void backspace_until_column __ARGS((int col));
|
|
Karsten Hopp |
81c285 |
int vim_is_ctrl_x_key __ARGS((int c));
|
|
Karsten Hopp |
81c285 |
int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
|
|
Karsten Hopp |
81c285 |
! void set_completion __ARGS((colnr_T startcol, list_T *list));
|
|
Karsten Hopp |
81c285 |
void ins_compl_show_pum __ARGS((void));
|
|
Karsten Hopp |
81c285 |
char_u *find_word_start __ARGS((char_u *ptr));
|
|
Karsten Hopp |
81c285 |
char_u *find_word_end __ARGS((char_u *ptr));
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/screen.c 2009-03-18 19:07:09.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/screen.c 2009-05-05 17:42:45.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 9481,9493 ****
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
int always;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! char_u buffer[70];
|
|
Karsten Hopp |
81c285 |
int row;
|
|
Karsten Hopp |
81c285 |
int fillchar;
|
|
Karsten Hopp |
81c285 |
int attr;
|
|
Karsten Hopp |
81c285 |
int empty_line = FALSE;
|
|
Karsten Hopp |
81c285 |
colnr_T virtcol;
|
|
Karsten Hopp |
81c285 |
int i;
|
|
Karsten Hopp |
81c285 |
int o;
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
81c285 |
int this_ru_col;
|
|
Karsten Hopp |
81c285 |
--- 9481,9495 ----
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
int always;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! #define RULER_BUF_LEN 70
|
|
Karsten Hopp |
81c285 |
! char_u buffer[RULER_BUF_LEN];
|
|
Karsten Hopp |
81c285 |
int row;
|
|
Karsten Hopp |
81c285 |
int fillchar;
|
|
Karsten Hopp |
81c285 |
int attr;
|
|
Karsten Hopp |
81c285 |
int empty_line = FALSE;
|
|
Karsten Hopp |
81c285 |
colnr_T virtcol;
|
|
Karsten Hopp |
81c285 |
int i;
|
|
Karsten Hopp |
81c285 |
+ size_t len;
|
|
Karsten Hopp |
81c285 |
int o;
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
81c285 |
int this_ru_col;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 9602,9612 ****
|
|
Karsten Hopp |
81c285 |
* Some sprintfs return the length, some return a pointer.
|
|
Karsten Hopp |
81c285 |
* To avoid portability problems we use strlen() here.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! sprintf((char *)buffer, "%ld,",
|
|
Karsten Hopp |
81c285 |
(wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
|
|
Karsten Hopp |
81c285 |
? 0L
|
|
Karsten Hopp |
81c285 |
: (long)(wp->w_cursor.lnum));
|
|
Karsten Hopp |
81c285 |
! col_print(buffer + STRLEN(buffer),
|
|
Karsten Hopp |
81c285 |
empty_line ? 0 : (int)wp->w_cursor.col + 1,
|
|
Karsten Hopp |
81c285 |
(int)virtcol + 1);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 9604,9615 ----
|
|
Karsten Hopp |
81c285 |
* Some sprintfs return the length, some return a pointer.
|
|
Karsten Hopp |
81c285 |
* To avoid portability problems we use strlen() here.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
! vim_snprintf((char *)buffer, RULER_BUF_LEN, "%ld,",
|
|
Karsten Hopp |
81c285 |
(wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
|
|
Karsten Hopp |
81c285 |
? 0L
|
|
Karsten Hopp |
81c285 |
: (long)(wp->w_cursor.lnum));
|
|
Karsten Hopp |
81c285 |
! len = STRLEN(buffer);
|
|
Karsten Hopp |
81c285 |
! col_print(buffer + len, RULER_BUF_LEN - len,
|
|
Karsten Hopp |
81c285 |
empty_line ? 0 : (int)wp->w_cursor.col + 1,
|
|
Karsten Hopp |
81c285 |
(int)virtcol + 1);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 9616,9622 ****
|
|
Karsten Hopp |
81c285 |
* screen up on some terminals).
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
i = (int)STRLEN(buffer);
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, buffer + i + 1);
|
|
Karsten Hopp |
81c285 |
o = i + vim_strsize(buffer + i + 1);
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
81c285 |
if (wp->w_status_height == 0) /* can't use last char of screen */
|
|
Karsten Hopp |
81c285 |
--- 9619,9625 ----
|
|
Karsten Hopp |
81c285 |
* screen up on some terminals).
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
i = (int)STRLEN(buffer);
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, buffer + i + 1, RULER_BUF_LEN - i - 1);
|
|
Karsten Hopp |
81c285 |
o = i + vim_strsize(buffer + i + 1);
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
81c285 |
if (wp->w_status_height == 0) /* can't use last char of screen */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 9643,9649 ****
|
|
Karsten Hopp |
81c285 |
buffer[i++] = fillchar;
|
|
Karsten Hopp |
81c285 |
++o;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, buffer + i);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
/* Truncate at window boundary. */
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
--- 9646,9652 ----
|
|
Karsten Hopp |
81c285 |
buffer[i++] = fillchar;
|
|
Karsten Hopp |
81c285 |
++o;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
/* Truncate at window boundary. */
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/structs.h 2008-11-15 16:05:30.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/structs.h 2009-05-05 18:20:36.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 33,41 ****
|
|
Karsten Hopp |
81c285 |
} pos_T;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VIRTUALEDIT
|
|
Karsten Hopp |
81c285 |
! # define INIT_POS_T {0, 0, 0}
|
|
Karsten Hopp |
81c285 |
#else
|
|
Karsten Hopp |
81c285 |
! # define INIT_POS_T {0, 0}
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
--- 33,41 ----
|
|
Karsten Hopp |
81c285 |
} pos_T;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_VIRTUALEDIT
|
|
Karsten Hopp |
81c285 |
! # define INIT_POS_T(l, c, ca) {l, c, ca}
|
|
Karsten Hopp |
81c285 |
#else
|
|
Karsten Hopp |
81c285 |
! # define INIT_POS_T(l, c, ca) {l, c}
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1166,1172 ****
|
|
Karsten Hopp |
81c285 |
char_u *b_fname; /* current file name */
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef UNIX
|
|
Karsten Hopp |
81c285 |
! int b_dev; /* device number (-1 if not set) */
|
|
Karsten Hopp |
81c285 |
ino_t b_ino; /* inode number */
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_CW_EDITOR
|
|
Karsten Hopp |
81c285 |
--- 1166,1172 ----
|
|
Karsten Hopp |
81c285 |
char_u *b_fname; /* current file name */
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef UNIX
|
|
Karsten Hopp |
81c285 |
! dev_t b_dev; /* device number (-1 if not set) */
|
|
Karsten Hopp |
81c285 |
ino_t b_ino; /* inode number */
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_CW_EDITOR
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1645,1651 ****
|
|
Karsten Hopp |
81c285 |
--- 1645,1655 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
#ifdef FEAT_DIFF
|
|
Karsten Hopp |
81c285 |
diff_T *tp_first_diff;
|
|
Karsten Hopp |
81c285 |
+ # ifdef S_SPLINT_S /* splint doesn't understand the array of pointers */
|
|
Karsten Hopp |
81c285 |
+ buf_T **tp_diffbuf;
|
|
Karsten Hopp |
81c285 |
+ # else
|
|
Karsten Hopp |
81c285 |
buf_T *(tp_diffbuf[DB_COUNT]);
|
|
Karsten Hopp |
81c285 |
+ # endif
|
|
Karsten Hopp |
81c285 |
int tp_diff_invalid; /* list of diffs is outdated */
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
frame_T *tp_snapshot; /* window layout snapshot */
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.166/src/version.c 2009-04-29 18:44:38.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/version.c 2009-05-13 12:06:36.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 678,679 ****
|
|
Karsten Hopp |
81c285 |
--- 678,681 ----
|
|
Karsten Hopp |
81c285 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
81c285 |
+ /**/
|
|
Karsten Hopp |
81c285 |
+ 167,
|
|
Karsten Hopp |
81c285 |
/**/
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--
|
|
Karsten Hopp |
81c285 |
Snoring is prohibited unless all bedroom windows are closed and securely
|
|
Karsten Hopp |
81c285 |
locked.
|
|
Karsten Hopp |
81c285 |
[real standing law in Massachusetts, United States of America]
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
81c285 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
81c285 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
81c285 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|