Remove FEAT_DIFF

Support for vim's diff mode.
This commit is contained in:
Hinidu
2014-04-08 23:55:58 +03:00
committed by Justin M. Keyes
parent dd7657c160
commit 6f38fe39c4
3 changed files with 12 additions and 45 deletions

View File

@@ -116,7 +116,6 @@
#define FEAT_CON_DIALOG #define FEAT_CON_DIALOG
#define FEAT_CSCOPE #define FEAT_CSCOPE
#define FEAT_CURSORBIND #define FEAT_CURSORBIND
#define FEAT_DIFF
#define FEAT_DIGRAPHS #define FEAT_DIGRAPHS
#define FEAT_EVAL #define FEAT_EVAL
#define FEAT_EX_EXTRA #define FEAT_EX_EXTRA

View File

@@ -353,17 +353,14 @@ struct vimoption {
* for the currency sign. */ * for the currency sign. */
# define ISP_LATIN1 (char_u *)"@,161-255" # define ISP_LATIN1 (char_u *)"@,161-255"
/* The 16 bit MS-DOS version is low on space, make the string as short as
* possible when compiling with few features. */
#if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
|| defined(FEAT_VERTSPLIT) \
|| defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
#define HIGHLIGHT_INIT \ #define HIGHLIGHT_INIT \
"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn" "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search," \
#else "m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine," \
# define HIGHLIGHT_INIT \ "S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg," \
"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill" "W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete," \
#endif "T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare," \
"L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine," \
"#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn"
/* /*
* options[] is initialized here. * options[] is initialized here.

View File

@@ -2301,11 +2301,7 @@ win_line (
int change_end = -1; /* last col of changed area */ int change_end = -1; /* last col of changed area */
colnr_T trailcol = MAXCOL; /* start of trailing spaces */ colnr_T trailcol = MAXCOL; /* start of trailing spaces */
int need_showbreak = FALSE; int need_showbreak = FALSE;
#if defined(FEAT_SIGNS) || defined(FEAT_QUICKFIX) \
|| defined(FEAT_SYN_HL) || defined(FEAT_DIFF)
# define LINE_ATTR
int line_attr = 0; /* attribute for the whole line */ int line_attr = 0; /* attribute for the whole line */
#endif
matchitem_T *cur; /* points to the match list */ matchitem_T *cur; /* points to the match list */
match_T *shl; /* points to search_hl or a match */ match_T *shl; /* points to search_hl or a match */
int shl_flag; /* flag to indicate whether search_hl int shl_flag; /* flag to indicate whether search_hl
@@ -2315,9 +2311,7 @@ win_line (
of the matches */ of the matches */
int prev_c = 0; /* previous Arabic character */ int prev_c = 0; /* previous Arabic character */
int prev_c1 = 0; /* first composing char for prev_c */ int prev_c1 = 0; /* first composing char for prev_c */
#if defined(LINE_ATTR)
int did_line_attr = 0; int did_line_attr = 0;
#endif
/* draw_state: items that are drawn in sequence: */ /* draw_state: items that are drawn in sequence: */
#define WL_START 0 /* nothing done yet */ #define WL_START 0 /* nothing done yet */
@@ -2518,7 +2512,6 @@ win_line (
filler_lines = wp->w_topfill; filler_lines = wp->w_topfill;
filler_todo = filler_lines; filler_todo = filler_lines;
#ifdef LINE_ATTR
/* If this line has a sign with line highlighting set line_attr. */ /* If this line has a sign with line highlighting set line_attr. */
v = buf_getsigntype(wp->w_buffer, lnum, SIGN_LINEHL); v = buf_getsigntype(wp->w_buffer, lnum, SIGN_LINEHL);
if (v != 0) if (v != 0)
@@ -2529,7 +2522,6 @@ win_line (
line_attr = hl_attr(HLF_L); line_attr = hl_attr(HLF_L);
if (line_attr != 0) if (line_attr != 0)
area_highlighting = TRUE; area_highlighting = TRUE;
#endif
line = ml_get_buf(wp->w_buffer, lnum, FALSE); line = ml_get_buf(wp->w_buffer, lnum, FALSE);
ptr = line; ptr = line;
@@ -3036,14 +3028,12 @@ win_line (
char_attr = area_attr; char_attr = area_attr;
else if (search_attr != 0) else if (search_attr != 0)
char_attr = search_attr; char_attr = search_attr;
#ifdef LINE_ATTR
/* Use line_attr when not in the Visual or 'incsearch' area /* Use line_attr when not in the Visual or 'incsearch' area
* (area_attr may be 0 when "noinvcur" is set). */ * (area_attr may be 0 when "noinvcur" is set). */
else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL) else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
|| vcol < fromcol || vcol_prev < fromcol_prev || vcol < fromcol || vcol_prev < fromcol_prev
|| vcol >= tocol)) || vcol >= tocol))
char_attr = line_attr; char_attr = line_attr;
#endif
else { else {
attr_pri = FALSE; attr_pri = FALSE;
if (has_syntax) if (has_syntax)
@@ -3509,15 +3499,7 @@ win_line (
* character if the line break is included. */ * character if the line break is included. */
/* For a diff line the highlighting continues after the /* For a diff line the highlighting continues after the
* "$". */ * "$". */
if ( if (diff_hlf == (hlf_T)0 && line_attr == 0) {
diff_hlf == (hlf_T)0
# ifdef LINE_ATTR
&&
# endif
# ifdef LINE_ATTR
line_attr == 0
# endif
) {
/* In virtualedit, visual selections may extend /* In virtualedit, visual selections may extend
* beyond end of line. */ * beyond end of line. */
if (area_highlighting && virtual_active() if (area_highlighting && virtual_active()
@@ -3570,9 +3552,7 @@ win_line (
(col < W_WIDTH(wp)))) { (col < W_WIDTH(wp)))) {
c = ' '; c = ' ';
--ptr; /* put it back at the NUL */ --ptr; /* put it back at the NUL */
} } else if ((
#if defined(LINE_ATTR)
else if ((
diff_hlf != (hlf_T)0 || diff_hlf != (hlf_T)0 ||
line_attr != 0 line_attr != 0
) && ( ) && (
@@ -3596,7 +3576,6 @@ win_line (
char_attr = hl_attr(diff_hlf); char_attr = hl_attr(diff_hlf);
} }
} }
#endif
} }
if ( wp->w_p_cole > 0 if ( wp->w_p_cole > 0
@@ -3705,11 +3684,7 @@ win_line (
/* /*
* At end of the text line or just after the last character. * At end of the text line or just after the last character.
*/ */
if (c == NUL if (c == NUL || did_line_attr == 1) {
#if defined(LINE_ATTR)
|| did_line_attr == 1
#endif
) {
long prevcol = (long)(ptr - line) - (c == NUL); long prevcol = (long)(ptr - line) - (c == NUL);
/* we're not really at that column when skipping some text */ /* we're not really at that column when skipping some text */
@@ -3740,11 +3715,7 @@ win_line (
|| lnum == curwin->w_cursor.lnum) || lnum == curwin->w_cursor.lnum)
&& c == NUL) && c == NUL)
/* highlight 'hlsearch' match at end of line */ /* highlight 'hlsearch' match at end of line */
|| (prevcol_hl_flag == TRUE || (prevcol_hl_flag == TRUE && did_line_attr <= 1)
# if defined(LINE_ATTR)
&& did_line_attr <= 1
# endif
)
)) { )) {
int n = 0; int n = 0;