aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/news.txt4
-rw-r--r--runtime/doc/options.txt4
-rw-r--r--runtime/doc/vim_diff.txt4
-rw-r--r--runtime/lua/vim/_meta/options.lua4
-rw-r--r--src/nvim/buffer.c12
-rw-r--r--src/nvim/option_vars.h2
-rw-r--r--src/nvim/options.lua4
-rw-r--r--src/nvim/optionstr.c2
-rw-r--r--test/functional/editor/jump_spec.lua6
9 files changed, 23 insertions, 19 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 1d95886356..e0e90f78ec 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -18,6 +18,10 @@ BREAKING CHANGES IN HEAD *news-breaking-dev*
The following changes to UNRELEASED features were made during the development
cycle (Nvim HEAD, the "master" branch).
+OPTIONS
+
+• 'jumpoptions' flag "unload" has been renamed to "clean".
+
==============================================================================
BREAKING CHANGES *news-breaking*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index e7190e718d..cf6fb000f4 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3665,7 +3665,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Otherwise only one space is inserted.
*'jumpoptions'* *'jop'*
-'jumpoptions' 'jop' string (default "unload")
+'jumpoptions' 'jop' string (default "clean")
global
List of words that change the behavior of the |jumplist|.
stack Make the jumplist behave like the tagstack.
@@ -3678,7 +3678,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|alternate-file| or using |mark-motions| try to
restore the |mark-view| in which the action occurred.
- unload Remove unloaded buffers from the jumplist.
+ clean Remove unloaded buffers from the jumplist.
EXPERIMENTAL: this flag may change in the future.
*'keymap'* *'kmp'*
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index b2e8476fd7..d0868b5605 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -62,7 +62,7 @@ Defaults *nvim-defaults*
- 'isfname' does not include ":" (on Windows). Drive letters are handled
correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
- 'joinspaces' is disabled
-- 'jumpoptions' defaults to "unload"
+- 'jumpoptions' defaults to "clean"
- 'langnoremap' is enabled
- 'langremap' is disabled
- 'laststatus' defaults to 2 (statusline is always shown)
@@ -348,7 +348,7 @@ string options work.
and |:command-preview| commands
- 'jumpoptions'
- "view" tries to restore |mark-view| when moving through the jumplist.
- - "unload" removes unloaded buffers from the jumplist.
+ - "clean" removes unloaded buffers from the jumplist.
- the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|.
- 'laststatus' global statusline support
- 'mousescroll' amount to scroll by when scrolling with a mouse
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 7456be0ae0..923d279887 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -3577,11 +3577,11 @@ vim.go.js = vim.go.joinspaces
--- |alternate-file` or using `mark-motions` try to
--- restore the `mark-view` in which the action occurred.
---
---- unload Remove unloaded buffers from the jumplist.
+--- clean Remove unloaded buffers from the jumplist.
--- EXPERIMENTAL: this flag may change in the future.
---
--- @type string
-vim.o.jumpoptions = "unload"
+vim.o.jumpoptions = "clean"
vim.o.jop = vim.o.jumpoptions
vim.go.jumpoptions = vim.o.jumpoptions
vim.go.jop = vim.go.jumpoptions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index e47db44f68..271f3fa725 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -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;
diff --git a/src/nvim/option_vars.h b/src/nvim/option_vars.h
index b6b307befb..b9c61160e1 100644
--- a/src/nvim/option_vars.h
+++ b/src/nvim/option_vars.h
@@ -540,7 +540,7 @@ EXTERN char *p_jop; ///< 'jumpooptions'
EXTERN unsigned jop_flags;
#define JOP_STACK 0x01
#define JOP_VIEW 0x02
-#define JOP_UNLOAD 0x04
+#define JOP_CLEAN 0x04
EXTERN char *p_keymap; ///< 'keymap'
EXTERN char *p_kp; ///< 'keywordprg'
EXTERN char *p_km; ///< 'keymodel'
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 8943faad7d..9d50b04221 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -4515,7 +4515,7 @@ return {
{
abbreviation = 'jop',
cb = 'did_set_jumpoptions',
- defaults = { if_true = 'unload' },
+ defaults = { if_true = 'clean' },
deny_duplicates = true,
desc = [=[
List of words that change the behavior of the |jumplist|.
@@ -4529,7 +4529,7 @@ return {
|alternate-file| or using |mark-motions| try to
restore the |mark-view| in which the action occurred.
- unload Remove unloaded buffers from the jumplist.
+ clean Remove unloaded buffers from the jumplist.
EXPERIMENTAL: this flag may change in the future.
]=],
expand_cb = 'expand_set_jumpoptions',
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 8e853b6ee0..8eadd52972 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -139,7 +139,7 @@ static char *(p_fdc_values[]) = { "auto", "auto:1", "auto:2", "auto:3", "auto:4"
"5", "6", "7", "8", "9", NULL };
static char *(p_spo_values[]) = { "camel", "noplainbuffer", NULL };
static char *(p_icm_values[]) = { "nosplit", "split", NULL };
-static char *(p_jop_values[]) = { "stack", "view", "unload", NULL };
+static char *(p_jop_values[]) = { "stack", "view", "clean", NULL };
static char *(p_tpf_values[]) = { "BS", "HT", "FF", "ESC", "DEL", "C0", "C1", NULL };
static char *(p_rdb_values[]) = { "compositor", "nothrottle", "invalid", "nodelta", "line",
"flush", NULL };
diff --git a/test/functional/editor/jump_spec.lua b/test/functional/editor/jump_spec.lua
index 6d2f75e7c5..ab4cefaf84 100644
--- a/test/functional/editor/jump_spec.lua
+++ b/test/functional/editor/jump_spec.lua
@@ -194,7 +194,7 @@ describe("jumpoptions=stack behaves like 'tagstack'", function()
end)
end)
-describe('buffer deletion with jumpoptions+=unload', function()
+describe('buffer deletion with jumpoptions+=clean', function()
local base_file = 'Xtest-functional-buffer-deletion'
local file1 = base_file .. '1'
local file2 = base_file .. '2'
@@ -325,7 +325,7 @@ describe('buffer deletion with jumpoptions+=unload', function()
end)
end)
-describe('buffer deletion with jumpoptions-=unload', function()
+describe('buffer deletion with jumpoptions-=clean', function()
local base_file = 'Xtest-functional-buffer-deletion'
local file1 = base_file .. '1'
local file2 = base_file .. '2'
@@ -336,7 +336,7 @@ describe('buffer deletion with jumpoptions-=unload', function()
before_each(function()
clear()
command('clearjumps')
- command('set jumpoptions-=unload')
+ command('set jumpoptions-=clean')
write_file(file1, content1, false, false)
write_file(file2, content2, false, false)