# Implementation Tweaks and Bug Fixes
-* disable autoindent when pasting text
-* update getstr to select context when selection is null
* center find results and jumped to line on screen
* Use select to check for error strings in exec.c
* Should not be able to undo initial tag line text insertion
char* view_fetch(View* view, size_t row, size_t col);
void view_find(View* view, size_t row, size_t col);
void view_findstr(View* view, char* str);
-void view_insert(View* view, Rune rune);
+void view_insert(View* view, bool indent, Rune rune);
void view_delete(View* view, int dir, bool byword);
void view_bol(View* view, bool extsel);
void view_eol(View* view, bool extsel);
view->sync_needed = true;
}
-void view_insert(View* view, Rune rune) {
+void view_insert(View* view, bool indent, Rune rune) {
/* ignore non-printable control characters */
if (!isspace(rune) && rune < 0x20)
return;
if (num_selected(view->selection))
view_delete(view, RIGHT, false);
- view->selection.end = buf_ins(&(view->buffer), true, view->selection.end, rune);
+ view->selection.end = buf_ins(&(view->buffer), indent, view->selection.end, rune);
view->selection.beg = view->selection.end;
view->selection.col = buf_getcol(&(view->buffer), view->selection.end);
view->sync_needed = true;
Rune rune = 0;
size_t length = 0;
while (!utf8decode(&rune, &length, *str++));
- view_insert(view, rune);
+ view_insert(view, false, rune);
}
buf_loglock(&(view->buffer));
}
{ ModCtrl, 'f', search },
{ ModCtrl, 'd', execute },
{ ModCtrl, 'o', open_file },
- //{ ModCtrl, 'p', find_ctag },
+ //{ ModCtrl, 'p', pick_ctag },
{ ModCtrl, 'g', goto_ctag },
};
/* fallback to just inserting the rune if it doesn't fall in the private use area.
* the private use area is used to encode special keys */
if (key < 0xE000 || key > 0xF8FF)
- view_insert(currview(), key);
+ view_insert(currview(), true, key);
}
/* Drawing Routines