|
@@ -117,6 +117,17 @@ static void kill_eol ( struct edit_string *string ) {
|
117
|
117
|
insert_delete ( string, ~( ( size_t ) 0 ), NULL );
|
118
|
118
|
}
|
119
|
119
|
|
|
120
|
+/**
|
|
121
|
+ * Replace editable string
|
|
122
|
+ *
|
|
123
|
+ * @v string Editable string
|
|
124
|
+ * @v replacement Replacement string
|
|
125
|
+ */
|
|
126
|
+void replace_string ( struct edit_string *string, const char *replacement ) {
|
|
127
|
+ string->cursor = 0;
|
|
128
|
+ insert_delete ( string, ~( ( size_t ) 0 ), replacement );
|
|
129
|
+}
|
|
130
|
+
|
120
|
131
|
/**
|
121
|
132
|
* Edit editable string
|
122
|
133
|
*
|