[gnome-builder] vim: implement uppercase with `U' during selection
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: implement uppercase with `U' during selection
- Date: Mon, 22 Dec 2014 23:53:35 +0000 (UTC)
commit 0fbece95f154d4b18e82fb7a5c000e59c2631248
Author: Christian Hergert <christian hergert me>
Date: Mon Dec 22 15:53:24 2014 -0800
vim: implement uppercase with `U' during selection
Like `u', this is a different command when there is a selection. `U' is
uppercase.
src/vim/gb-source-vim.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index a2f4aa6..7b26e71 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -4591,6 +4591,21 @@ gb_source_vim_cmd_undo_redo (GbSourceVim *vim,
if (!GTK_SOURCE_IS_BUFFER (buffer))
return;
+ /*
+ * TODO: I don't like that we are overloading a command based on there
+ * being a selection or not. Real VIM probably handles this as
+ * selections having a different mode (thereby a deferent command
+ * hashtable lookup).
+ */
+
+ has_selection = gb_source_vim_get_selection_bounds (vim, &iter, &selection);
+
+ if (has_selection)
+ {
+ gb_source_vim_toggle_case (vim, GTK_SOURCE_CHANGE_CASE_UPPER);
+ return;
+ }
+
if (gtk_source_buffer_can_redo (GTK_SOURCE_BUFFER (buffer)))
gb_source_vim_redo (vim);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]