aboutsummaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-13 22:35:26 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-13 22:35:26 +0200
commit9da490af05b2aac772f0bdbb934dd313c1271749 (patch)
treec21aa06e029e6d725baed9283e44990d22e38d72 /text.c
parentc17ca10e11db30f4b4924b69dbf3b1693025d4dc (diff)
downloadvis-9da490af05b2aac772f0bdbb934dd313c1271749.tar.gz
vis-9da490af05b2aac772f0bdbb934dd313c1271749.tar.xz
Rename text_insert_raw to text_insert
Diffstat (limited to 'text.c')
-rw-r--r--text.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/text.c b/text.c
index 4f1f28e..7cdfd03 100644
--- a/text.c
+++ b/text.c
@@ -491,7 +491,7 @@ static void change_free(Change *c) {
* | | |short| | existing text | | |
* \-+ <-- +-----+ <-- +---------------+ <-- +-/
*/
-bool text_insert_raw(Text *txt, size_t pos, const char *data, size_t len) {
+bool text_insert(Text *txt, size_t pos, const char *data, size_t len) {
if (pos > txt->size)
return false;
if (pos < txt->lines.pos)
@@ -544,10 +544,6 @@ bool text_insert_raw(Text *txt, size_t pos, const char *data, size_t len) {
return true;
}
-bool text_insert(Text *txt, size_t pos, const char *data) {
- return text_insert_raw(txt, pos, data, strlen(data));
-}
-
size_t text_undo(Text *txt) {
size_t pos = -1;
/* taking a snapshot makes sure that txt->current_action is reset */