0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.0200

This commit is contained in:
Bram Moolenaar
2006-02-17 21:53:23 +00:00
parent 49d7bf13e0
commit 997fb4ba69
17 changed files with 620 additions and 306 deletions

View File

@@ -1526,6 +1526,60 @@ struct file_buffer
};
#ifdef FEAT_DIFF
/*
* Stuff for diff mode.
*/
# define DB_COUNT 4 /* up to four buffers can be diff'ed */
/*
* Each diffblock defines where a block of lines starts in each of the buffers
* and how many lines it occupies in that buffer. When the lines are missing
* in the buffer the df_count[] is zero. This is all counted in
* buffer lines.
* There is always at least one unchanged line in between the diffs.
* Otherwise it would have been included in the diff above or below it.
* df_lnum[] + df_count[] is the lnum below the change. When in one buffer
* lines have been inserted, in the other buffer df_lnum[] is the line below
* the insertion and df_count[] is zero. When appending lines at the end of
* the buffer, df_lnum[] is one beyond the end!
* This is using a linked list, because the number of differences is expected
* to be reasonable small. The list is sorted on lnum.
*/
typedef struct diffblock_S diff_T;
struct diffblock_S
{
diff_T *df_next;
linenr_T df_lnum[DB_COUNT]; /* line number in buffer */
linenr_T df_count[DB_COUNT]; /* nr of inserted/changed lines */
};
#endif
/*
* Tab pages point to the top frame of each tab page.
* Note: Most values are NOT valid for the current tab page! Use "curwin",
* "firstwin", etc. for that. "tp_topframe" is always valid and can be
* compared against "topframe" to find the current tab page.
*/
typedef struct tabpage_S tabpage_T;
struct tabpage_S
{
tabpage_T *tp_next; /* next tabpage or NULL */
frame_T *tp_topframe; /* topframe for the windows */
win_T *tp_curwin; /* current window in this Tab page */
win_T *tp_prevwin; /* previous window in this Tab page */
win_T *tp_firstwin; /* first window in this Tab page */
win_T *tp_lastwin; /* last window in this Tab page */
long tp_old_Rows; /* Rows when Tab page was left */
long tp_old_Columns; /* Columns when Tab page was left */
#ifdef FEAT_DIFF
diff_T *tp_first_diff;
buf_T *(tp_diffbuf[DB_COUNT]);
int tp_diff_invalid; /* list of diffs is outdated */
#endif
};
/*
* Structure to cache info for displayed lines in w_lines[].
* Each logical line has one entry.
@@ -1549,22 +1603,6 @@ typedef struct w_line
#endif
} wline_T;
/*
* Tab pages point to the top frame of each tab page.
*/
typedef struct tabpage_S tabpage_T;
struct tabpage_S
{
tabpage_T *tp_next; /* next tabpage or NULL */
frame_T *tp_topframe; /* topframe for the windows */
win_T *tp_curwin; /* current window in this Tab page */
win_T *tp_prevwin; /* previous window in this Tab page */
win_T *tp_firstwin; /* first window in this Tab page */
win_T *tp_lastwin; /* last window in this Tab page */
long tp_old_Rows; /* Rows when Tab page was left */
long tp_old_Columns; /* Columns when Tab page was left */
};
/*
* Windows are kept in a tree of frames. Each frame has a column (FR_COL)
* or row (FR_ROW) layout or is a leaf, which has a window.