Implement keyboard shortcuts for scrolling

This commit is contained in:
Kovid Goyal
2016-11-21 20:48:51 +05:30
parent b1dba240ca
commit b426210e38
5 changed files with 60 additions and 5 deletions

View File

@@ -70,6 +70,10 @@ static inline void init_line(HistoryBuf *self, index_type num, Line *l) {
l->combining_chars = (combining_type*)(l->decoration_fg + self->xnum);
}
void historybuf_init_line(HistoryBuf *self, index_type lnum, Line *l) {
init_line(self, index_of(self, lnum), l);
}
static inline index_type historybuf_push(HistoryBuf *self) {
index_type idx = (self->start_of_data + self->count) % self->ynum;
init_line(self, idx, self->line);