diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-03-23 15:13:05 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-03-23 15:13:05 +0100 |
commit | f7ff6e85e8a4e84cff023f5db4b66ef85986605a (patch) | |
tree | 813913a9c1d1418b5b85e3a4bc414dbeb2b3f6a3 /src | |
parent | a68783751647e3243ca6f22df62907efbdbccb02 (diff) |
updated for version 7.4.212v7.4.212
Problem: Now that the +visual feature is always enabled the #ifdefs for it
are not useful.
Solution: Remove the checks for FEAT_VISUAL.
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 2 | ||||
-rw-r--r-- | src/charset.c | 7 | ||||
-rw-r--r-- | src/edit.c | 22 | ||||
-rw-r--r-- | src/eval.c | 15 | ||||
-rw-r--r-- | src/ex_cmds.c | 2 | ||||
-rw-r--r-- | src/ex_docmd.c | 14 | ||||
-rw-r--r-- | src/feature.h | 6 | ||||
-rw-r--r-- | src/fold.c | 6 | ||||
-rw-r--r-- | src/getchar.c | 8 | ||||
-rw-r--r-- | src/globals.h | 4 | ||||
-rw-r--r-- | src/gui.c | 2 | ||||
-rw-r--r-- | src/gui_mac.c | 8 | ||||
-rw-r--r-- | src/gui_w48.c | 2 | ||||
-rw-r--r-- | src/main.c | 15 | ||||
-rw-r--r-- | src/mark.c | 16 | ||||
-rw-r--r-- | src/menu.c | 4 | ||||
-rw-r--r-- | src/misc2.c | 17 | ||||
-rw-r--r-- | src/move.c | 6 | ||||
-rw-r--r-- | src/netbeans.c | 2 | ||||
-rw-r--r-- | src/normal.c | 359 | ||||
-rw-r--r-- | src/ops.c | 177 | ||||
-rw-r--r-- | src/option.c | 20 | ||||
-rw-r--r-- | src/option.h | 4 | ||||
-rw-r--r-- | src/os_msdos.c | 4 | ||||
-rw-r--r-- | src/os_qnx.c | 4 | ||||
-rw-r--r-- | src/os_win32.h | 2 | ||||
-rw-r--r-- | src/quickfix.c | 2 | ||||
-rw-r--r-- | src/regexp.c | 6 | ||||
-rw-r--r-- | src/regexp_nfa.c | 2 | ||||
-rw-r--r-- | src/screen.c | 59 | ||||
-rw-r--r-- | src/search.c | 64 | ||||
-rw-r--r-- | src/spell.c | 7 | ||||
-rw-r--r-- | src/structs.h | 10 | ||||
-rw-r--r-- | src/syntax.c | 4 | ||||
-rw-r--r-- | src/term.c | 5 | ||||
-rw-r--r-- | src/ui.c | 24 | ||||
-rw-r--r-- | src/undo.c | 24 | ||||
-rw-r--r-- | src/version.c | 10 | ||||
-rw-r--r-- | src/window.c | 30 |
39 files changed, 119 insertions, 856 deletions
diff --git a/src/buffer.c b/src/buffer.c index d68646790e..c703465e3f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1432,10 +1432,8 @@ set_curbuf(buf, action) curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */ buflist_altfpos(curwin); /* remember curpos */ -#ifdef FEAT_VISUAL /* Don't restart Select mode after switching to another buffer. */ VIsual_reselect = FALSE; -#endif /* close_windows() or apply_autocmds() may change curbuf */ prevbuf = curbuf; diff --git a/src/charset.c b/src/charset.c index fd4b500be5..61a56f6533 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1380,10 +1380,7 @@ getvcol(wp, pos, start, cursor, end) && (State & NORMAL) && !wp->w_p_list && !virtual_active() -#ifdef FEAT_VISUAL - && !(VIsual_active - && (*p_sel == 'e' || ltoreq(*pos, VIsual))) -#endif + && !(VIsual_active && (*p_sel == 'e' || ltoreq(*pos, VIsual))) ) *cursor = vcol + incr - 1; /* cursor at end */ else @@ -1463,7 +1460,6 @@ getvvcol(wp, pos, start, cursor, end) } #endif -#if defined(FEAT_VISUAL) || defined(PROTO) /* * Get the leftmost and rightmost virtual column of pos1 and pos2. * Used for Visual block mode. @@ -1500,7 +1496,6 @@ getvcols(wp, pos1, pos2, left, right) else *right = to1; } -#endif /* * skipwhite: skip over ' ' and '\t'. diff --git a/src/edit.c b/src/edit.c index 57bd7761e1..1c6f2f899a 100644 --- a/src/edit.c +++ b/src/edit.c @@ -220,9 +220,7 @@ static int ins_esc __ARGS((long *count, int cmdchar, int nomove)); #ifdef FEAT_RIGHTLEFT static void ins_ctrl_ __ARGS((void)); #endif -#ifdef FEAT_VISUAL static int ins_start_select __ARGS((int c)); -#endif static void ins_insert __ARGS((int replaceState)); static void ins_ctrl_o __ARGS((void)); static void ins_shift __ARGS((int c, int lastc)); @@ -932,7 +930,6 @@ edit(cmdchar, startln, count) } #endif -#ifdef FEAT_VISUAL /* * If 'keymodel' contains "startsel", may start selection. If it * does, a CTRL-O and c will be stuffed, we need to get these @@ -940,7 +937,6 @@ edit(cmdchar, startln, count) */ if (ins_start_select(c)) continue; -#endif /* * The big switch to handle a character in insert mode. @@ -6900,7 +6896,6 @@ stop_insert(end_insert_pos, esc, nomove) else if (cc != NUL) ++curwin->w_cursor.col; /* put cursor back on the NUL */ -#ifdef FEAT_VISUAL /* <C-S-Right> may have started Visual mode, adjust the position for * deleted characters. */ if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) @@ -6910,12 +6905,11 @@ stop_insert(end_insert_pos, esc, nomove) if (VIsual.col > len) { VIsual.col = len; -# ifdef FEAT_VIRTUALEDIT +#ifdef FEAT_VIRTUALEDIT VIsual.coladd = 0; -# endif +#endif } } -#endif } } did_ai = FALSE; @@ -8112,9 +8106,7 @@ ins_reg() int need_redraw = FALSE; int regname; int literally = 0; -#ifdef FEAT_VISUAL int vis_active = VIsual_active; -#endif /* * If we are going to wait for a character, show a '"'. @@ -8218,11 +8210,9 @@ ins_reg() if (need_redraw || stuff_empty()) edit_unputchar(); -#ifdef FEAT_VISUAL /* Disallow starting Visual mode here, would get a weird mode. */ if (!vis_active && VIsual_active) end_visual_mode(); -#endif } /* @@ -8419,11 +8409,7 @@ ins_esc(count, cmdchar, nomove) #endif ) && (restart_edit == NUL - || (gchar_cursor() == NUL -#ifdef FEAT_VISUAL - && !VIsual_active -#endif - )) + || (gchar_cursor() == NUL && !VIsual_active)) #ifdef FEAT_RIGHTLEFT && !revins_on #endif @@ -8525,7 +8511,6 @@ ins_ctrl_() } #endif -#ifdef FEAT_VISUAL /* * If 'keymodel' contains "startsel", may start selection. * Returns TRUE when a CTRL-O and other keys stuffed. @@ -8581,7 +8566,6 @@ ins_start_select(c) } return FALSE; } -#endif /* * <Insert> key in Insert mode: toggle insert/replace mode. diff --git a/src/eval.c b/src/eval.c index 59cfd1292c..12794d4cbd 100644 --- a/src/eval.c +++ b/src/eval.c @@ -11833,12 +11833,10 @@ f_getregtype(argvars, rettv) { case MLINE: buf[0] = 'V'; break; case MCHAR: buf[0] = 'v'; break; -#ifdef FEAT_VISUAL case MBLOCK: buf[0] = Ctrl_V; sprintf((char *)buf + 1, "%ld", reglen + 1); break; -#endif } rettv->v_type = VAR_STRING; rettv->vval.v_string = vim_strsave(buf); @@ -12552,9 +12550,7 @@ f_has(argvars, rettv) #ifdef FEAT_VIRTUALEDIT "virtualedit", #endif -#ifdef FEAT_VISUAL "visual", -#endif #ifdef FEAT_VISUALEXTRA "visualextra", #endif @@ -14397,7 +14393,6 @@ f_mode(argvars, rettv) buf[1] = NUL; buf[2] = NUL; -#ifdef FEAT_VISUAL if (VIsual_active) { if (VIsual_select) @@ -14405,9 +14400,7 @@ f_mode(argvars, rettv) else buf[0] = VIsual_mode; } - else -#endif - if (State == HITRETURN || State == ASKMORE || State == SETWSIZE + else if (State == HITRETURN || State == ASKMORE || State == SETWSIZE || State == CONFIRM) { buf[0] = 'r'; @@ -16756,7 +16749,6 @@ f_setreg(argvars, rettv) case 'V': case 'l': /* line-wise selection */ yank_type = MLINE; break; -#ifdef FEAT_VISUAL case 'b': case Ctrl_V: /* block-wise selection */ yank_type = MBLOCK; if (VIM_ISDIGIT(stropt[1])) @@ -16766,7 +16758,6 @@ f_setreg(argvars, rettv) --stropt; } break; -#endif } } @@ -18769,7 +18760,6 @@ f_visualmode(argvars, rettv) typval_T *argvars UNUSED; typval_T *rettv UNUSED; { -#ifdef FEAT_VISUAL char_u str[2]; rettv->v_type = VAR_STRING; @@ -18780,7 +18770,6 @@ f_visualmode(argvars, rettv) /* A non-zero number or non-empty string argument: reset mode. */ if (non_zero_arg(&argvars[0])) curbuf->b_visual_mode_eval = NUL; -#endif } /* @@ -19154,14 +19143,12 @@ var2fpos(varp, dollar_lnum, fnum) return NULL; if (name[0] == '.') /* cursor */ return &curwin->w_cursor; -#ifdef FEAT_VISUAL if (name[0] == 'v' && name[1] == NUL) /* Visual start */ { if (VIsual_active) return &VIsual; return &curwin->w_cursor; } -#endif if (name[0] == '\'') /* mark */ { pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum); diff --git a/src/ex_cmds.c b/src/ex_cmds.c index fc83aba19e..f99f8830fb 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3274,13 +3274,11 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin) goto theend; } -#ifdef FEAT_VISUAL /* * End Visual mode before switching to another buffer, so the text can be * copied into the GUI selection buffer. */ reset_VIsual(); -#endif #ifdef FEAT_AUTOCMD if ((command != NULL || newlnum > (linenr_T)0) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index e2c972403b..507de7d15a 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -8577,10 +8577,8 @@ ex_operators(eap) beginline(BL_SOL | BL_FIX); } -#if defined(FEAT_VISUAL) if (VIsual_active) end_visual_mode(); -#endif switch (eap->cmdidx) { @@ -8991,11 +8989,7 @@ ex_redraw(eap) RedrawingDisabled = 0; p_lz = FALSE; update_topline(); - update_screen(eap->forceit ? CLEAR : -#ifdef FEAT_VISUAL - VIsual_active ? INVERTED : -#endif - 0); + update_screen(eap->forceit ? CLEAR : VIsual_active ? INVERTED : 0); #ifdef FEAT_TITLE if (need_maketitle) maketitle(); @@ -9030,11 +9024,7 @@ ex_redrawstatus(eap) status_redraw_all(); else status_redraw_curbuf(); - update_screen( -# ifdef FEAT_VISUAL - VIsual_active ? INVERTED : -# endif - 0); + update_screen(VIsual_active ? INVERTED : 0); RedrawingDisabled = r; p_lz = p; out_flush(); diff --git a/src/feature.h b/src/feature.h index 83ab55dffd..917179401b 100644 --- a/src/feature.h +++ b/src/feature.h @@ -214,7 +214,6 @@ * +visual Visual mode - now always included. * +visualextra Extra features for Visual mode (mostly block operators). */ -#define FEAT_VISUAL #ifdef FEAT_NORMAL # define FEAT_VISUALEXTRA #endif @@ -1138,13 +1137,10 @@ #ifdef FEAT_GUI # ifndef FEAT_CLIPBOARD # define FEAT_CLIPBOARD -# ifndef FEAT_VISUAL -# define FEAT_VISUAL -# endif # endif #endif -#if defined(FEAT_NORMAL) && defined(FEAT_VISUAL) \ +#if defined(FEAT_NORMAL) \ && (defined(UNIX) || defined(VMS)) \ && defined(WANT_X11) && defined(HAVE_X11) # define FEAT_XCLIPBOARD diff --git a/src/fold.c b/src/fold.c index cd58c9153c..41fcee0fd6 100644 --- a/src/fold.c +++ b/src/fold.c @@ -430,11 +430,9 @@ opFoldRange(first, last, opening, recurse, had_visual) } if (done == DONE_NOTHING) EMSG(_(e_nofold)); -#ifdef FEAT_VISUAL /* Force a redraw to remove the Visual highlighting. */ if (had_visual) redraw_curbuf_later(INVERTED); -#endif } /* openFold() {{{2 */ @@ -807,11 +805,9 @@ deleteFold(start, end, recursive, had_visual) if (!did_one) { EMSG(_(e_nofold)); -#ifdef FEAT_VISUAL /* Force a redraw to remove the Visual highlighting. */ if (had_visual) redraw_curbuf_later(INVERTED); -#endif } else /* Deleting markers may make cursor column invalid. */ @@ -1065,7 +1061,6 @@ find_wl_entry(win, lnum) } /* foldAdjustVisual() {{{2 */ -#ifdef FEAT_VISUAL /* * Adjust the Visual area to include any fold at the start or end completely. */ @@ -1103,7 +1098,6 @@ foldAdjustVisual() #endif } } -#endif /* cursor_foldstart() {{{2 */ /* diff --git a/src/getchar.c b/src/getchar.c index 7455c778d8..b39e64d97a 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -870,7 +870,6 @@ start_redo(count, old_redo) c = read_redo(FALSE, old_redo); } -#ifdef FEAT_VISUAL if (c == 'v') /* redo Visual */ { VIsual = curwin->w_cursor; @@ -880,7 +879,6 @@ start_redo(count, old_redo) redo_VIsual_busy = TRUE; c = read_redo(FALSE, old_redo); } -#endif /* try to enter the count (in place of a previous count) */ if (count) @@ -1162,7 +1160,6 @@ typebuf_typed() return typebuf.tb_maplen == 0; } -#if defined(FEAT_VISUAL) || defined(PROTO) /* * Return the number of characters that are mapped (or not typed). */ @@ -1171,7 +1168,6 @@ typebuf_maplen() { return typebuf.tb_maplen; } -#endif /* * remove "len" characters from typebuf.tb_buf[typebuf.tb_off + offset] @@ -2443,7 +2439,6 @@ vgetorpeek(advance) idx = get_menu_index(current_menu, local_State); if (idx != MENU_INDEX_INVALID) { -# ifdef FEAT_VISUAL /* * In Select mode and a Visual mode menu * is used: Switch to Visual mode @@ -2457,7 +2452,6 @@ vgetorpeek(advance) (void)ins_typebuf(K_SELECT_STRING, REMAP_NONE, 0, TRUE, FALSE); } -# endif ins_typebuf(current_menu->strings[idx], current_menu->noremap[idx], 0, TRUE, @@ -2516,7 +2510,6 @@ vgetorpeek(advance) break; } -#ifdef FEAT_VISUAL /* * In Select mode and a Visual mode mapping is used: * Switch to Visual mode temporarily. Append K_SELECT @@ -2529,7 +2522,6 @@ vgetorpeek(advance) (void)ins_typebuf(K_SELECT_STRING, REMAP_NONE, 0, TRUE, FALSE); } -#endif #ifdef FEAT_EVAL /* Copy the values from *mp that are used, because diff --git a/src/globals.h b/src/globals.h index fd4e70c742..0281103360 100644 --- a/src/globals.h +++ b/src/globals.h @@ -662,7 +662,6 @@ EXTERN int silent_mode INIT(= FALSE); /* set to TRUE when "-s" commandline argument * used for ex */ -#ifdef FEAT_VISUAL EXTERN pos_T VIsual; /* start position of active Visual selection */ EXTERN int VIsual_active INIT(= FALSE); /* whether Visual mode is active */ @@ -677,7 +676,6 @@ EXTERN int VIsual_mode INIT(= 'v'); EXTERN int redo_VIsual_busy INIT(= FALSE); /* TRUE when redoing Visual */ -#endif #ifdef FEAT_MOUSE /* @@ -1178,11 +1176,9 @@ EXTERN int fill_fold INIT(= '-'); EXTERN int fill_diff INIT(= '-'); #endif -#ifdef FEAT_VISUAL /* Whether 'keymodel' contains "stopsel" and "startsel". */ EXTERN int km_stopsel INIT(= FALSE); EXTERN int km_startsel INIT(= FALSE); -#endif #ifdef FEAT_CMDWIN EXTERN int cedit_key INIT(= -1); /* key value of 'cedit' option */ @@ -3132,11 +3132,9 @@ button_set: */ if (!mouse_has(checkfor) || checkfor == MOUSE_COMMAND) { -#ifdef FEAT_VISUAL /* Don't do modeless selection in Visual mode. */ if (checkfor != MOUSE_NONEF && VIsual_active && (State & NORMAL)) return; -#endif /* * When 'mousemodel' is "popup", shift-left is translated to right. diff --git a/src/gui_mac.c b/src/gui_mac.c index 573dc7a116..54087c518b 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -1068,11 +1068,7 @@ HandleODocAE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon) } */ - -#ifdef FEAT_VISUAL reset_VIsual(); -#endif - fnames = new_fnames_from_AEDesc(&theList, &numFiles, &error); if (error) @@ -1142,7 +1138,7 @@ HandleODocAE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon) /* Update the screen display */ update_screen(NOT_VALID); -#ifdef FEAT_VISUAL + /* Select the text if possible */ if (gotPosition) { @@ -1160,7 +1156,7 @@ HandleODocAE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon) VIsual.col = 0; } } -#endif + setcursor(); out_flush(); diff --git a/src/gui_w48.c b/src/gui_w48.c index 4d9032019f..89b60908e5 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -3708,9 +3708,7 @@ _OnDropFiles( DragQueryPoint(hDrop, &pt); MapWindowPoints(s_hwnd, s_textArea, &pt, 1); -# ifdef FEAT_VISUAL reset_VIsual(); -# endif fnames = (char_u **)alloc(cFiles * sizeof(char_u *)); diff --git a/src/main.c b/src/main.c index 79521ef468..f9bd8732ee 100644 --- a/src/main.c +++ b/src/main.c @@ -1057,9 +1057,7 @@ main_loop(cmdwin, noexmode) if (!cmdwin && !noexmode && SETJMP(x_jump_env)) { State = NORMAL; -# ifdef FEAT_VISUAL VIsual_active = FALSE; -# endif got_int = TRUE; need_wait_return = FALSE; global_busy = FALSE; @@ -1096,11 +1094,7 @@ main_loop(cmdwin, noexmode) check_timestamps(FALSE); if (need_wait_return) /* if wait_return still needed ... */ wait_return(FALSE); /* ... call it now */ - if (need_start_insertmode && goto_im() -#ifdef FEAT_VISUAL - && !VIsual_active -#endif - ) + if (need_start_insertmode && goto_im() && !VIsual_active) { need_start_insertmode = FALSE; stuffReadbuff((char_u *)"i"); /* start insert mode next */ @@ -1202,7 +1196,7 @@ main_loop(cmdwin, noexmode) diff_need_scrollbind = FALSE; } #endif -#if defined(FEAT_FOLDING) && defined(FEAT_VISUAL) +#if defined(FEAT_FOLDING) /* Include a closed fold completely in the Visual area. */ foldAdjustVisual(); #endif @@ -1228,12 +1222,9 @@ main_loop(cmdwin, noexmode) update_topline(); validate_cursor(); -#ifdef FEAT_VISUAL if (VIsual_active) update_curbuf(INVERTED);/* update inverted part */ - else -#endif - if (must_redraw) + else if (must_redraw) update_screen(0); else if (redraw_cmdline || clear_cmdline) showmode(); diff --git a/src/mark.c b/src/mark.c index 9c17f7afb7..ef9ddc07ea 100644 --- a/src/mark.c +++ b/src/mark.c @@ -98,7 +98,6 @@ setmark_pos(c, pos, fnum) return OK; } -#ifdef FEAT_VISUAL if (c == '<' || c == '>') { if (c == '<') @@ -110,7 +109,6 @@ setmark_pos(c, pos, fnum) curbuf->b_visual.vi_mode = 'v'; return OK; } -#endif #ifndef EBCDIC if (c > 'z') /* some islower() and isupper() cannot handle @@ -340,9 +338,7 @@ getmark_buf_fnum(buf, c, changefile, fnum) int *fnum; { pos_T *posp; -#ifdef FEAT_VISUAL pos_T *startp, *endp; -#endif static pos_T pos_copy; posp = NULL; @@ -403,7 +399,6 @@ getmark_buf_fnum(buf, c, changefile, fnum) curwin->w_cursor = pos; listcmd_busy = slcb; } -#ifdef FEAT_VISUAL else if (c == '<' || c == '>') /* start/end of visual area */ { startp = &buf->b_visual.vi_start; @@ -428,7 +423,6 @@ getmark_buf_fnum(buf, c, changefile, fnum) #endif } } -#endif else if (ASCII_ISLOWER(c)) /* normal named mark */ { posp = &(buf->b_namedm[c - 'a']); @@ -757,10 +751,8 @@ do_marks(eap) show_one_mark(']', arg, &curbuf->b_op_end, NULL, TRUE); show_one_mark('^', arg, &curbuf->b_last_insert, NULL, TRUE); show_one_mark('.', arg, &curbuf->b_last_change, NULL, TRUE); -#ifdef FEAT_VISUAL show_one_mark('<', arg, &curbuf->b_visual.vi_start, NULL, TRUE); show_one_mark('>', arg, &curbuf->b_visual.vi_end, NULL, TRUE); -#endif show_one_mark(-1, arg, NULL, NULL, FALSE); } @@ -892,10 +884,8 @@ ex_delmarks(eap) case '.': curbuf->b_last_change.lnum = 0; break; case '[': curbuf->b_op_start.lnum = 0; break; case ']': curbuf->b_op_end.lnum = 0; break; -#ifdef FEAT_VISUAL case '<': curbuf->b_visual.vi_start.lnum = 0; break; case '>': curbuf->b_visual.vi_end.lnum = 0; break; -#endif case ' ': break; default: EMSG2(_(e_invarg2), p); return; @@ -1085,11 +1075,9 @@ mark_adjust(line1, line2, amount, amount_after) one_adjust_nodel(&(curbuf->b_changelist[i].lnum)); #endif -#ifdef FEAT_VISUAL /* Visual area */ one_adjust_nodel(&(curbuf->b_visual.vi_start.lnum)); one_adjust_nodel(&(curbuf->b_visual.vi_end.lnum)); -#endif #ifdef FEAT_QUICKFIX /* quickfix marks */ @@ -1136,14 +1124,12 @@ mark_adjust(line1, line2, amount, amount_after) if (win->w_tagstack[i].fmark.fnum == fnum) one_adjust_nodel(&(win->w_tagstack[i].fmark.mark.lnum)); -#ifdef FEAT_VISUAL /* the displayed Visual area */ if (win->w_old_cursor_lnum != 0) { one_adjust_nodel(&(win->w_old_cursor_lnum)); one_adjust_nodel(&(win->w_old_visual_lnum)); } -#endif /* topline and cursor position for windows with the same buffer * other than the current window */ @@ -1260,11 +1246,9 @@ mark_col_adjust(lnum, mincol, lnum_amount, col_amount) col_adjust(&(curbuf->b_changelist[i])); #endif -#ifdef FEAT_VISUAL /* Visual area */ col_adjust(&(curbuf->b_visual.vi_start)); col_adjust(&(curbuf->b_visual.vi_end)); -#endif /* previous context mark */ col_adjust(&(curwin->w_pcmark)); diff --git a/src/menu.c b/src/menu.c index 42cf67eb99..d2ae1b05e4 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1640,7 +1640,6 @@ get_menu_index(menu, state) idx = MENU_INDEX_INSERT; else if (state & CMDLINE) idx = MENU_INDEX_CMDLINE; -#ifdef FEAT_VISUAL else if (VIsual_active) { if (VIsual_select) @@ -1648,7 +1647,6 @@ get_menu_index(menu, state) else idx = MENU_INDEX_VISUAL; } -#endif else if (state == HITRETURN || state == ASKMORE) idx = MENU_INDEX_CMDLINE; else if (finish_op) @@ -1811,14 +1809,12 @@ menu_is_tearoff(name) static int get_menu_mode() { -#ifdef FEAT_VISUAL if (VIsual_active) { if (VIsual_select) return MENU_INDEX_SELECT; return MENU_INDEX_VISUAL; } -#endif if (State & INSERT) return MENU_INDEX_INSERT; if ((State & CMDLINE) || State == ASKMORE || State == HITRETURN) diff --git a/src/misc2.c b/src/misc2.c index 8f8b2d9d46..a20337f48c 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -31,9 +31,7 @@ virtual_active() if (virtual_op != MAYBE) return virtual_op; return (ve_flags == VE_ALL -# ifdef FEAT_VISUAL || ((ve_flags & VE_BLOCK) && VIsual_active && VIsual_mode == Ctrl_V) -# endif || ((ve_flags & VE_INSERT) && (State & INSERT))); } @@ -149,9 +147,7 @@ coladvance2(pos, addspaces, finetune, wcol) one_more = (State & INSERT) || restart_edit != NUL -#ifdef FEAT_VISUAL || (VIsual_active && *p_sel != 'o') -#endif #ifdef FEAT_VIRTUALEDIT || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) #endif @@ -570,9 +566,7 @@ check_cursor_col_win(win) * - in Visual mode and 'selection' isn't "old" * - 'virtualedit' is set */ if ((State & INSERT) || restart_edit -#ifdef FEAT_VISUAL || (VIsual_active && *p_sel != 'o') -#endif #ifdef FEAT_VIRTUALEDIT || (ve_flags & VE_ONEMORE) #endif @@ -627,9 +621,7 @@ check_cursor() adjust_cursor_col() { if (curwin->w_cursor.col > 0 -# ifdef FEAT_VISUAL && (!VIsual_active || *p_sel == 'o') -# endif && gchar_cursor() == NUL) --curwin->w_cursor.col; } @@ -3290,17 +3282,14 @@ get_real_state() { if (State & NORMAL) { -#ifdef FEAT_VISUAL if (VIsual_active) { if (VIsual_select) return SELECTMODE; return VISUAL; } - else -#endif - if (finish_op) - return OP_PENDING; + else if (finish_op) + return OP_PENDING; } return State; } @@ -3738,7 +3727,6 @@ get_shape_idx(mouse) } if (finish_op) return SHAPE_IDX_O; -#ifdef FEAT_VISUAL if (VIsual_active) { if (*p_sel == 'e') @@ -3746,7 +3734,6 @@ get_shape_idx(mouse) else return SHAPE_IDX_V; } -#endif return SHAPE_IDX_N; } #endif diff --git a/src/move.c b/src/move.c index 67e214bf97..fff0c9c07f 100644 --- a/src/move.c +++ b/src/move.c @@ -2857,17 +2857,13 @@ do_check_cursorbind() win_T *old_curwin = curwin; buf_T *old_curbuf = curbuf; int restart_edit_save; -# ifdef FEAT_VISUAL int old_VIsual_select = VIsual_select; int old_VIsual_active = VIsual_active; -# endif /* * loop through the cursorbound windows */ -# ifdef FEAT_VISUAL VIsual_select = VIsual_active = 0; -# endif for (curwin = firstwin; curwin; curwin = curwin->w_next) { curbuf = curwin->w_buffer; @@ -2916,10 +2912,8 @@ do_check_cursorbind() /* * reset current-window */ -# ifdef FEAT_VISUAL VIsual_select = old_VIsual_select; VIsual_active = old_VIsual_active; -# endif curwin = old_curwin; curbuf = old_curbuf; } |