aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/map.c5
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/po/ja.po2
-rw-r--r--src/nvim/terminal.c19
-rw-r--r--src/nvim/window.c5
5 files changed, 23 insertions, 10 deletions
diff --git a/src/nvim/map.c b/src/nvim/map.c
index 03439e7a9c..398e74268f 100644
--- a/src/nvim/map.c
+++ b/src/nvim/map.c
@@ -129,7 +129,10 @@ static inline khint_t String_hash(String s)
static inline bool String_eq(String a, String b)
{
- return strncmp(a.data, b.data, MIN(a.size, b.size)) == 0;
+ if (a.size != b.size) {
+ return false;
+ }
+ return memcmp(a.data, b.data, a.size) == 0;
}
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index a498fc481a..25b3b85497 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5452,7 +5452,7 @@ static yankreg_T *adjust_clipboard_name(int *name, bool quiet, bool writing)
yankreg_T *target;
if (cb_flags & CB_UNNAMEDPLUS) {
- *name = cb_flags & CB_UNNAMED ? '"': '+';
+ *name = (cb_flags & CB_UNNAMED && writing) ? '"': '+';
target = &y_regs[PLUS_REGISTER];
} else {
*name = '*';
diff --git a/src/nvim/po/ja.po b/src/nvim/po/ja.po
index 8a3fcb8f78..0326f33bb5 100644
--- a/src/nvim/po/ja.po
+++ b/src/nvim/po/ja.po
@@ -5653,7 +5653,7 @@ msgstr "単語 '%.*s' が %s から削除されました"
#: ../spell.c:8117
#, c-format
msgid "Word '%.*s' added to %s"
-msgstr "%s に単語が追加されました"
+msgstr "単語 '%.*s' が %s へ追加されました"
#: ../spell.c:8381
msgid "E763: Word characters differ between spell files"
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index fd416b3dcc..6f50c03be9 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -241,6 +241,7 @@ Terminal *terminal_open(TerminalOptions opts)
set_option_value((uint8_t *)"wrap", false, NULL, OPT_LOCAL);
set_option_value((uint8_t *)"number", false, NULL, OPT_LOCAL);
set_option_value((uint8_t *)"relativenumber", false, NULL, OPT_LOCAL);
+ buf_set_term_title(curbuf, (char *)curbuf->b_ffname);
RESET_BINDING(curwin);
// Apply TermOpen autocmds so the user can configure the terminal
apply_autocmds(EVENT_TERMOPEN, NULL, NULL, false, curbuf);
@@ -618,6 +619,17 @@ static int term_movecursor(VTermPos new, VTermPos old, int visible,
return 1;
}
+static void buf_set_term_title(buf_T *buf, char *title)
+ FUNC_ATTR_NONNULL_ALL
+{
+ Error err;
+ api_free_object(dict_set_value(buf->b_vars,
+ cstr_as_string("term_title"),
+ STRING_OBJ(cstr_as_string(title)),
+ false,
+ &err));
+}
+
static int term_settermprop(VTermProp prop, VTermValue *val, void *data)
{
Terminal *term = data;
@@ -633,12 +645,7 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *data)
case VTERM_PROP_TITLE: {
buf_T *buf = handle_get_buffer(term->buf_handle);
- Error err;
- api_free_object(dict_set_value(buf->b_vars,
- cstr_as_string("term_title"),
- STRING_OBJ(cstr_as_string(val->string)),
- false,
- &err));
+ buf_set_term_title(buf, val->string);
break;
}
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 1298248f1e..e267d493bf 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -3296,8 +3296,11 @@ void tabpage_move(int nr)
tabpage_T *tp;
tabpage_T *tp_dst;
- if (first_tabpage->tp_next == NULL)
+ assert(curtab != NULL);
+
+ if (first_tabpage->tp_next == NULL) {
return;
+ }
for (tp = first_tabpage; tp->tp_next != NULL && n < nr; tp = tp->tp_next) {
++n;