[gnome-builder/wip/halfline/repeatable-indent: 1/4] vim: make gb_source_vim_recording_end no-op when in replay



commit de878a5f633fae3d6a1c8557e6f9583af2ca4a4e
Author: Ray Strode <rstrode redhat com>
Date:   Tue Feb 10 14:31:42 2015 -0500

    vim: make gb_source_vim_recording_end no-op when in replay
    
    When in the middle of a replace, gb_source_vim_recording_begin is
    aa no-op, so gb_source_vim_recording_end should be, too.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744286

 src/vim/gb-source-vim.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index ff28e2d..b51d567 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -332,7 +332,10 @@ gb_source_vim_recording_replay (GbSourceVim *vim)
 static void
 gb_source_vim_recording_end (GbSourceVim *vim)
 {
-  g_return_if_fail (vim->priv->recording);
+  g_return_if_fail (vim->priv->recording || vim->priv->in_replay);
+
+  if (vim->priv->in_replay)
+    return;
 
   vim->priv->recording = FALSE;
 }


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