[gnome-builder/wip/vim] vim: make command entry when switching to command mode
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/vim] vim: make command entry when switching to command mode
- Date: Wed, 1 Oct 2014 01:32:27 +0000 (UTC)
commit 918bbbbdee4604a0c684b649eaef922ba1ff59f6
Author: Christian Hergert <christian hergert me>
Date: Tue Sep 30 18:32:15 2014 -0700
vim: make command entry when switching to command mode
And hide in the opposite direction.
src/editor/gb-editor-vim.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 617eb2b..ac2d51f 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -130,6 +130,16 @@ gb_editor_vim_set_mode (GbEditorVim *vim,
gtk_entry_set_text (GTK_ENTRY (vim->priv->command_entry), "");
/*
+ * Make the command entry visible if necessary.
+ */
+ if (vim->priv->command_entry)
+ {
+ gtk_widget_set_visible (GTK_WIDGET (vim->priv->command_entry),
+ (mode == GB_EDITOR_VIM_COMMAND));
+ gtk_widget_grab_focus (GTK_WIDGET (vim->priv->command_entry));
+ }
+
+ /*
* If we are are going to normal mode and are at the end of the line,
* then move back a character so we are on the last character as opposed
* to after it. This matches closer to VIM.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]