[gimp] Implement GTK_DELETE_PARAGRAPH_ENDS (Ctrl+K in emacs)



commit 5f65026f943f6f8d4e250337baed490d40cf1238
Author: Michael Natterer <mitch gimp org>
Date:   Wed Jun 24 18:48:27 2009 +0200

    Implement GTK_DELETE_PARAGRAPH_ENDS (Ctrl+K in emacs)

 app/tools/gimptexttool.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index b268f80..5c2afe1 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -1686,6 +1686,17 @@ gimp_text_tool_delete_from_cursor (GimpTextTool  *text_tool,
       break;
 
     case GTK_DELETE_PARAGRAPH_ENDS:
+      if (count < 0)
+        {
+          gtk_text_iter_set_line_offset (&cursor, 0);
+        }
+      else if (count > 0)
+        {
+          if (! gtk_text_iter_ends_line (&end))
+            gtk_text_iter_forward_to_line_end (&end);
+          else
+            gtk_text_iter_forward_cursor_positions (&end, 1);
+        }
       break;
 
     case GTK_DELETE_PARAGRAPHS:



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