From 830a3a86bdd0e8685d0527c2dd17c667087ac7a1 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Mon, 21 Mar 2016 21:55:18 -0400 Subject: [PATCH] replace range bug fixed --- 4coder_default.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/4coder_default.cpp b/4coder_default.cpp index fdfdda0f..4f59b871 100644 --- a/4coder_default.cpp +++ b/4coder_default.cpp @@ -385,8 +385,9 @@ CUSTOM_COMMAND_SIG(replace_in_range){ pos = range.min; app->buffer_seek_string(app, &buffer, pos, r.str, r.size, 1, &new_pos); - while (new_pos + r.size < range.end){ + while (new_pos + r.size <= range.end){ app->buffer_replace_range(app, &buffer, new_pos, new_pos + r.size, w.str, w.size); + app->refresh_view(app, &view); range = get_range(&view); pos = new_pos + w.size; app->buffer_seek_string(app, &buffer, pos, r.str, r.size, 1, &new_pos);