summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBen Lu <ayroblu@gmail.com>2019-09-10 01:59:28 +0100
committerBen Lu <ayroblu@gmail.com>2019-09-10 01:59:28 +0100
commit4edcb9e24827a5549d95c52ff02f430bd0bfe398 (patch)
treeee43985ff93521b840604d6218401f6ddc1d0b16 /src
parent72458f7275076f38a0a33de0031483eb3bd33bbc (diff)
Add grammar and doc
Diffstat (limited to 'src')
-rw-r--r--src/conf.c1
-rwxr-xr-xsrc/doc4
-rwxr-xr-xsrc/gram.y2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 056329e..0f86788 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -76,6 +76,7 @@ void store_default_config_values() {
put(user_conf_d, "numeric_zero", "1");
put(user_conf_d, "numeric_decimal", "1");
put(user_conf_d, "overlap", "0");
+ put(user_conf_d, "truncate_cells", "0");
put(user_conf_d, "debug", "0");
put(user_conf_d, "ignorecase", "0");
put(user_conf_d, "trigger", "1");
diff --git a/src/doc b/src/doc
index 1dc01e3..b8687d9 100755
--- a/src/doc
+++ b/src/doc
@@ -1011,6 +1011,10 @@ Commands for handling cell content:
If cell content exceedes column width it gets cut off to fit the column
width. If overlap is set, the content overflows into the next column.
+ 'truncate_cells' [default off]
+ If cell content exceedes column width it gets replaced by asterisks '*'.
+ If truncate_cells is set, the content is cut off at the end of the cell.
+
'debug' [default off]
set this to see debug messages in screen
diff --git a/src/gram.y b/src/gram.y
index 5b208ac..7155f9d 100755
--- a/src/gram.y
+++ b/src/gram.y
@@ -1020,6 +1020,8 @@ setitem :
else parse_str(user_conf_d, "overlap=1", TRUE); }
| K_OVERLAP { parse_str(user_conf_d, "overlap=1", TRUE); }
| K_NOOVERLAP { parse_str(user_conf_d, "overlap=0", TRUE); }
+ | K_TRUNCATE_CELLS { parse_str(user_conf_d, "truncate_cells=1", TRUE); }
+ | K_NOTRUNCATE_CELLS { parse_str(user_conf_d, "truncate_cells=0", TRUE); }
| K_AUTOBACKUP '=' NUMBER {
char cmd[MAXCMD];
sprintf(cmd, "autobackup=%d", $3);