From 2bc29ff4260e28dd89409255997858ca447ad51f Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 4 May 2012 14:27:13 +0000 Subject: Patch [#30654] Wiki Quick Hack: Text editor move lines up/down Submitted by: Justin Dailey (dail) Patch allows the current line (or selected lines) to be moved up and down with Ctrl+Shift+Up and Ctrl+Shift+Down. Has undo/redo support and operators in python menu. --- source/blender/blenkernel/BKE_text.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/BKE_text.h') diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index b1902c75afb..393663456d5 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -96,6 +96,8 @@ void txt_unindent (struct Text *text); void txt_comment (struct Text *text); void txt_indent (struct Text *text); void txt_uncomment (struct Text *text); +void txt_move_lines_up (struct Text *text); +void txt_move_lines_down (struct Text *text); void txt_duplicate_line (struct Text *text); int setcurr_tab_spaces (struct Text *text, int space); @@ -170,6 +172,9 @@ int text_check_whitespace(const char ch); #define UNDO_COMMENT 034 #define UNDO_UNCOMMENT 035 +#define UNDO_MOVE_LINES_UP 036 +#define UNDO_MOVE_LINES_DOWN 037 + #define UNDO_DUPLICATE 040 /* Marker flags */ -- cgit v1.2.3