[gtksourceview/wip/chergert/vim: 206/293] default register is " not empty string




commit ff223bc532f44d22dc7e1e3fb8a4778e15720229
Author: Christian Hergert <chergert redhat com>
Date:   Tue Nov 2 12:10:13 2021 -0700

    default register is " not empty string

 gtksourceview/vim/gtk-source-vim-registers.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-registers.c b/gtksourceview/vim/gtk-source-vim-registers.c
index f901e9e6..5e383d50 100644
--- a/gtksourceview/vim/gtk-source-vim-registers.c
+++ b/gtksourceview/vim/gtk-source-vim-registers.c
@@ -23,6 +23,8 @@
 
 #include "gtk-source-vim-registers.h"
 
+#define DEFAULT_REGISTER "\""
+
 struct _GtkSourceVimRegisters
 {
        GtkSourceVimState parent_instance;
@@ -69,7 +71,7 @@ gtk_source_vim_registers_get (GtkSourceVimRegisters *self,
 
        if (name == NULL)
        {
-               name = "";
+               name = DEFAULT_REGISTER;
        }
 
        return g_hash_table_lookup (self->values, name);
@@ -91,7 +93,9 @@ gtk_source_vim_registers_take (GtkSourceVimRegisters *self,
        g_return_if_fail (GTK_SOURCE_IS_VIM_REGISTERS (self));
 
        if (name == NULL)
-               name = "";
+       {
+               name = DEFAULT_REGISTER;
+       }
 
        if (value == NULL)
                g_hash_table_remove (self->values, name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]