diff options
| author | Andrey Proskurin <andreyproskurin@protonmail.com> | 2021-05-09 18:17:20 +0000 |
|---|---|---|
| committer | Randy Palamar <palamar@ualberta.ca> | 2023-07-28 12:46:29 -0600 |
| commit | 5d7d62c73b258d06efaf5d93026b9e556e4e84d8 (patch) | |
| tree | 303ae344ee97f48a5bab4d6b98153c2f6e1a17c6 /sam.c | |
| parent | 1a81e0997422f0cbe249095d1b1b8ed5f4a4f983 (diff) | |
| download | vis-5d7d62c73b258d06efaf5d93026b9e556e4e84d8.tar.gz vis-5d7d62c73b258d06efaf5d93026b9e556e4e84d8.tar.xz | |
view.c: add word wrapping
this is contolled by the wrapcolumn/wc and breakat/brk options
related #142: Word wrap and line breaks
related #932: Vis for Prose?
related #1092: Disabling line wrapping
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -301,6 +301,8 @@ enum { OPTION_CHANGE_256COLORS, OPTION_LAYOUT, OPTION_IGNORECASE, + OPTION_BREAKAT, + OPTION_WRAP_COLUMN, }; static const OptionDef options[] = { @@ -394,6 +396,16 @@ static const OptionDef options[] = { VIS_OPTION_TYPE_BOOL, VIS_HELP("Ignore case when searching") }, + [OPTION_BREAKAT] = { + { "breakat", "brk" }, + VIS_OPTION_TYPE_STRING|VIS_OPTION_NEED_WINDOW, + VIS_HELP("Characters which might cause a word wrap") + }, + [OPTION_WRAP_COLUMN] = { + { "wrapcolumn", "wc" }, + VIS_OPTION_TYPE_NUMBER|VIS_OPTION_NEED_WINDOW, + VIS_HELP("Wrap lines at minimum of window width and wrapcolumn") + }, }; bool sam_init(Vis *vis) { |
