aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-05-19 14:45:06 -0700
committerMichael Ennen <mike.ennen@gmail.com>2016-05-19 14:46:38 -0700
commit2ebf365db909b835594d3f9a47e96551f5439b85 (patch)
tree29310238d60db19b8db688801b3eb23c9746ec74 /src
parent7d11cc6912b3f80a5b338323d685997c2d1e9dd3 (diff)
downloadrneovim-2ebf365db909b835594d3f9a47e96551f5439b85.tar.gz
rneovim-2ebf365db909b835594d3f9a47e96551f5439b85.tar.bz2
rneovim-2ebf365db909b835594d3f9a47e96551f5439b85.zip
vim-patch:7.4.1050
Problem: Warning for unused var with tiny features. (Tony Mechelynck) Solution: Add #ifdef. Use vim_snprintf(). Reduce number of statements. https://github.com/vim/vim/commit/c71982b23978ef61d0a2f0fe5535e782e1c561ed
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c21
-rw-r--r--src/nvim/version.c2
2 files changed, 10 insertions, 13 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index eda963ff77..407c8d56ab 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5372,11 +5372,10 @@ void cursor_pos_info(dict_T *dict)
}
}
- // Don't shorten this message, the user asked for it.
bom_count = bomb_size();
if (bom_count > 0) {
- vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE - STRLEN(IObuff),
- _("(+%" PRId64 " for BOM)"), (int64_t)byte_count);
+ vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
+ _("(+%" PRId64 " for BOM)"), (int64_t)bom_count);
}
if (dict == NULL) {
p = p_shm;
@@ -5387,20 +5386,18 @@ void cursor_pos_info(dict_T *dict)
}
if (dict != NULL) {
+ // Don't shorten this message, the user asked for it.
dict_add_nr_str(dict, "words", word_count, NULL);
dict_add_nr_str(dict, "chars", char_count, NULL);
dict_add_nr_str(dict, "bytes", byte_count + bom_count, NULL);
- if (l_VIsual_active) {
- dict_add_nr_str(dict, "visual_bytes", byte_count_cursor, NULL);
- dict_add_nr_str(dict, "visual_chars", char_count_cursor, NULL);
- dict_add_nr_str(dict, "visual_words", word_count_cursor, NULL);
- } else {
- dict_add_nr_str(dict, "cursor_bytes", byte_count_cursor, NULL);
- dict_add_nr_str(dict, "cursor_chars", char_count_cursor, NULL);
- dict_add_nr_str(dict, "cursor_words", word_count_cursor, NULL);
+ dict_add_nr_str(dict, l_VIsual_active ? "visual_bytes" : "cursor_bytes",
+ (long)byte_count_cursor, NULL);
+ dict_add_nr_str(dict, l_VIsual_active ? "visual_chars" : "cursor_chars",
+ (long)char_count_cursor, NULL);
+ dict_add_nr_str(dict, l_VIsual_active ? "visual_words" : "cursor_words",
+ (long)word_count_cursor, NULL);
}
- }
}
/// Check if the default register (used in an unnamed paste) should be a
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 3746f53e1f..af8b3b3fde 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -633,7 +633,7 @@ static int included_patches[] = {
// 1053,
1052,
// 1051,
- // 1050,
+ 1050,
1049,
1048,
1047,