diff options
Diffstat (limited to 'view.c')
| -rw-r--r-- | view.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -120,10 +120,16 @@ static void selection_free(Selection*); static size_t cursor_set(Selection*, Line *line, int col); void view_tabwidth_set(View *view, int tabwidth) { + if (tabwidth < 1 || tabwidth > 8) + return; view->tabwidth = tabwidth; view_draw(view); } +int view_tabwidth_get(View *view) { + return view->tabwidth; +} + /* reset internal view data structures (cell matrix, line offsets etc.) */ static void view_clear(View *view) { memset(view->lines, 0, view->lines_size); |
