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