[dev] vis: small patch placing the cursor the text inserted from the register
hi marc
here a small to place the cursor after the text inserted with ctrl-r
ciao
a.l.e
diff --git a/config.def.h b/config.def.h
index 9ecb018..685c787 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -921,7 +925,9 @@ static void delete(const Arg *arg) {
static void insert_register(const Arg *arg) {
Register *reg = &vis->registers[arg->i];
- editor_insert(vis, window_cursor_get(vis->win->win),
reg->data, reg->len);
+ int pos = window_cursor_get(vis->win->win);
+ editor_insert(vis, pos, reg->data, reg->len);
+ window_cursor_to(vis->win->win, pos + reg->len);
}
static void prompt(const Arg *arg) {
Received on Fri Oct 17 2014 - 18:14:06 CEST
This archive was generated by hypermail 2.3.0
: Fri Oct 17 2014 - 18:24:08 CEST