cursor position setting
This commit is contained in:
parent
611f270410
commit
3ec19cfae3
|
@ -705,6 +705,7 @@ write_string(Application_Links *app, String string){
|
||||||
app->buffer_replace_range(app, &buffer,
|
app->buffer_replace_range(app, &buffer,
|
||||||
view.cursor.pos, view.cursor.pos,
|
view.cursor.pos, view.cursor.pos,
|
||||||
string.str, string.size);
|
string.str, string.size);
|
||||||
|
app->view_set_cursor(app, &view, seek_pos(view.cursor.pos + string.size), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_COMMAND_SIG(write_increment){
|
CUSTOM_COMMAND_SIG(write_increment){
|
||||||
|
|
2
4ed.cpp
2
4ed.cpp
|
@ -468,6 +468,7 @@ COMMAND_DECL(word_complete){
|
||||||
|
|
||||||
if (search_hit_add(general, &complete_state->hits, &complete_state->str, spare, match_size)){
|
if (search_hit_add(general, &complete_state->hits, &complete_state->str, spare, match_size)){
|
||||||
view_replace_range(system, models, view, word_start, word_end, spare, match_size);
|
view_replace_range(system, models, view, word_start, word_end, spare, match_size);
|
||||||
|
view_cursor_move(view, word_start + match_size);
|
||||||
|
|
||||||
complete_state->word_end = word_start + match_size;
|
complete_state->word_end = word_start + match_size;
|
||||||
complete_state->set.ranges[1].start = word_start + match_size;
|
complete_state->set.ranges[1].start = word_start + match_size;
|
||||||
|
@ -486,6 +487,7 @@ COMMAND_DECL(word_complete){
|
||||||
match_size = complete_state->iter.word.size;
|
match_size = complete_state->iter.word.size;
|
||||||
view_replace_range(system, models, view, word_start, word_end,
|
view_replace_range(system, models, view, word_start, word_end,
|
||||||
complete_state->iter.word.str, match_size);
|
complete_state->iter.word.str, match_size);
|
||||||
|
view_cursor_move(view, word_start + match_size);
|
||||||
|
|
||||||
complete_state->word_end = word_start + match_size;
|
complete_state->word_end = word_start + match_size;
|
||||||
complete_state->set.ranges[1].start = word_start + match_size;
|
complete_state->set.ranges[1].start = word_start + match_size;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Distribution Date: 5.7.2016 (dd.mm.yyyy)
|
Distribution Date: 6.7.2016 (dd.mm.yyyy)
|
||||||
|
|
||||||
Thank you for contributing to the 4coder project!
|
Thank you for contributing to the 4coder project!
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Distribution Date: 5.7.2016 (dd.mm.yyyy)
|
Distribution Date: 6.7.2016 (dd.mm.yyyy)
|
||||||
|
|
||||||
Thank you for contributing to the 4coder project!
|
Thank you for contributing to the 4coder project!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue