Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes#811
This commit introduces the `readonly` variable as well as the `-ro`
command line option which prevent buffers from being overwritten on
disk when the `write` command is used without arguments. Some buffers
can selectively be put in readonly mode by setting the `readonly`
variable on the `buffer` scope, the `global` mode will affect all
buffers (even those who will be open subsequently), using the `window`
scope will have no effect.
Closes#685
c++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MD -MP -MF .buffer.d -c -o .buffer.o buffer.cc
buffer.cc:35:20: warning: logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
kak_assert(not line->length == 0 and line->data()[line->length-1] == '\n');
^ ~~
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:35:20: note: add parentheses after the '!' to evaluate the comparison first
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:35:20: note: add parentheses around left hand side expression to silence this warning
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:177:20: warning: logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
kak_assert(not line->length == 0 and line->data()[line->length-1] == '\n');
^ ~~
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:177:20: note: add parentheses after the '!' to evaluate the comparison first
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:177:20: note: add parentheses around left hand side expression to silence this warning
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
2 warnings generated.