mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418)
Follow-up to #29347
This commit is contained in:
@@ -1388,7 +1388,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
|
||||
|
||||
// If the buffer to be deleted is not the current one, delete it here.
|
||||
if (buf != curbuf) {
|
||||
if (jop_flags & JOP_UNLOAD) {
|
||||
if (jop_flags & JOP_CLEAN) {
|
||||
// Remove the buffer to be deleted from the jump list.
|
||||
mark_jumplist_forget_file(curwin, buf_fnum);
|
||||
}
|
||||
@@ -1414,7 +1414,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
|
||||
if (au_new_curbuf.br_buf != NULL && bufref_valid(&au_new_curbuf)) {
|
||||
buf = au_new_curbuf.br_buf;
|
||||
} else if (curwin->w_jumplistlen > 0) {
|
||||
if (jop_flags & JOP_UNLOAD) {
|
||||
if (jop_flags & JOP_CLEAN) {
|
||||
// Remove the buffer from the jump list.
|
||||
mark_jumplist_forget_file(curwin, buf_fnum);
|
||||
}
|
||||
@@ -1424,7 +1424,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
|
||||
if (curwin->w_jumplistlen > 0) {
|
||||
int jumpidx = curwin->w_jumplistidx;
|
||||
|
||||
if (jop_flags & JOP_UNLOAD) {
|
||||
if (jop_flags & JOP_CLEAN) {
|
||||
// If the index is the same as the length, the current position was not yet added to the
|
||||
// jump list. So we can safely go back to the last entry and search from there.
|
||||
if (jumpidx == curwin->w_jumplistlen) {
|
||||
@@ -1438,7 +1438,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
|
||||
}
|
||||
|
||||
forward = jumpidx;
|
||||
while ((jop_flags & JOP_UNLOAD) || jumpidx != curwin->w_jumplistidx) {
|
||||
while ((jop_flags & JOP_CLEAN) || jumpidx != curwin->w_jumplistidx) {
|
||||
buf = buflist_findnr(curwin->w_jumplist[jumpidx].fmark.fnum);
|
||||
|
||||
if (buf != NULL) {
|
||||
@@ -1455,7 +1455,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
|
||||
}
|
||||
}
|
||||
if (buf != NULL) { // found a valid buffer: stop searching
|
||||
if (jop_flags & JOP_UNLOAD) {
|
||||
if (jop_flags & JOP_CLEAN) {
|
||||
curwin->w_jumplistidx = jumpidx;
|
||||
update_jumplist = false;
|
||||
}
|
||||
@@ -3715,7 +3715,7 @@ void ex_buffer_all(exarg_T *eap)
|
||||
|
||||
// Open the buffer in this window.
|
||||
swap_exists_action = SEA_DIALOG;
|
||||
set_curbuf(buf, DOBUF_GOTO, !(jop_flags & JOP_UNLOAD));
|
||||
set_curbuf(buf, DOBUF_GOTO, !(jop_flags & JOP_CLEAN));
|
||||
if (!bufref_valid(&bufref)) {
|
||||
// Autocommands deleted the buffer.
|
||||
swap_exists_action = SEA_NONE;
|
||||
|
Reference in New Issue
Block a user