0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

updated for version 7.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.
This commit is contained in:
Bram Moolenaar
2014-03-23 15:13:05 +01:00
parent a687837516
commit f7ff6e85e8
39 changed files with 121 additions and 858 deletions

View File

@@ -532,9 +532,7 @@ u_savecommon(top, bot, newbot, reload)
/* save named marks and Visual marks for undo */
mch_memmove(uhp->uh_namedm, curbuf->b_namedm, sizeof(pos_T) * NMARKS);
#ifdef FEAT_VISUAL
uhp->uh_visual = curbuf->b_visual;
#endif
curbuf->b_u_newhead = uhp;
if (curbuf->b_u_oldhead == NULL)
@@ -1014,16 +1012,7 @@ serialize_uhp(fp, buf, uhp)
/* Assume NMARKS will stay the same. */
for (i = 0; i < NMARKS; ++i)
serialize_pos(uhp->uh_namedm[i], fp);
#ifdef FEAT_VISUAL
serialize_visualinfo(&uhp->uh_visual, fp);
#else
{
visualinfo_T info;
memset(&info, 0, sizeof(visualinfo_T));
serialize_visualinfo(&info, fp);
}
#endif
put_time(fp, uhp->uh_time);
/* Optional fields. */
@@ -1082,14 +1071,7 @@ unserialize_uhp(fp, file_name)
uhp->uh_flags = get2c(fp);
for (i = 0; i < NMARKS; ++i)
unserialize_pos(&uhp->uh_namedm[i], fp);
#ifdef FEAT_VISUAL
unserialize_visualinfo(&uhp->uh_visual, fp);
#else
{
visualinfo_T info;
unserialize_visualinfo(&info, fp);
}
#endif
uhp->uh_time = get8ctime(fp);
/* Optional fields. */
@@ -2406,9 +2388,7 @@ u_undoredo(undo)
int old_flags;
int new_flags;
pos_T namedm[NMARKS];
#ifdef FEAT_VISUAL
visualinfo_T visualinfo;
#endif
int empty_buffer; /* buffer became empty */
u_header_T *curhead = curbuf->b_u_curhead;
@@ -2430,9 +2410,7 @@ u_undoredo(undo)
* save marks before undo/redo
*/
mch_memmove(namedm, curbuf->b_namedm, sizeof(pos_T) * NMARKS);
#ifdef FEAT_VISUAL
visualinfo = curbuf->b_visual;
#endif
curbuf->b_op_start.lnum = curbuf->b_ml.ml_line_count;
curbuf->b_op_start.col = 0;
curbuf->b_op_end.lnum = 0;
@@ -2602,13 +2580,11 @@ u_undoredo(undo)
curbuf->b_namedm[i] = curhead->uh_namedm[i];
curhead->uh_namedm[i] = namedm[i];
}
#ifdef FEAT_VISUAL
if (curhead->uh_visual.vi_start.lnum != 0)
{
curbuf->b_visual = curhead->uh_visual;
curhead->uh_visual = visualinfo;
}
#endif
/*
* If the cursor is only off by one line, put it at the same position as