mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
refactor(diff.c): simplify diff_buf_idx()
This commit is contained in:
@@ -211,13 +211,7 @@ static void diff_buf_clear(void)
|
|||||||
/// @return Its index or DB_COUNT if not found.
|
/// @return Its index or DB_COUNT if not found.
|
||||||
static int diff_buf_idx(buf_T *buf)
|
static int diff_buf_idx(buf_T *buf)
|
||||||
{
|
{
|
||||||
int idx;
|
return diff_buf_idx_tp(buf, curtab);
|
||||||
for (idx = 0; idx < DB_COUNT; idx++) {
|
|
||||||
if (curtab->tp_diffbuf[idx] == buf) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return idx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Find buffer "buf" in the list of diff buffers for tab page "tp".
|
/// Find buffer "buf" in the list of diff buffers for tab page "tp".
|
||||||
|
Reference in New Issue
Block a user