- hmm, yank kind of implies removal so 'yank_and_delete' is kind of redundantly long

Tue, 16 Dec 2014 00:55:03 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Tue, 16 Dec 2014 00:55:03 +0200
changeset 55
79e5460a8a56
parent 54
e20e306c886d
child 56
b4caacf567af

- hmm, yank kind of implies removal so 'yank_and_delete' is kind of redundantly long

sources/interface.cpp file | annotate | diff | comparison | revisions
--- a/sources/interface.cpp	Tue Dec 16 00:53:46 2014 +0200
+++ b/sources/interface.cpp	Tue Dec 16 00:55:03 2014 +0200
@@ -629,7 +629,7 @@
 // -------------------------------------------------------------------------------------------------
 //
 static FUNCTION
-interface_yank_and_delete (int a, int b) -> void
+yank (int a, int b) -> void
 {
 	if (a >= b)
 		return;
@@ -781,17 +781,17 @@
 	case 'U' - 'A' + 1: // readline ^U - delete from start to cursor
 		if (g_cursor > 0)
 		{
-			interface_yank_and_delete (0, g_cursor);
+			yank (0, g_cursor);
 			g_cursor = 0;
 		}
 		break;
 
 	case 'K' - 'A' + 1: // readline ^K - delete from cursor to end
-		interface_yank_and_delete (g_cursor, mutable_current_input().length());
+		yank (g_cursor, mutable_current_input().length());
 		break;
 
 	case 'W' - 'A' + 1: // readline ^W - delete from previous word bounary to current
-		interface_yank_and_delete (interface_find_previous_word(), g_cursor);
+		yank (interface_find_previous_word(), g_cursor);
 		break;
 
 	case 'Y' - 'A' + 1: // readline ^Y - paste previously deleted text
@@ -877,7 +877,7 @@
 			case 'd':
 			case 'D':
 				// readline alt-d - delete from here till next word boundary
-				interface_yank_and_delete (g_cursor, interface_find_next_word());
+				yank (g_cursor, interface_find_next_word());
 				break;
 			}
 		}

mercurial