]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed off-by-one error in line number column determination
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 5 Jul 2017 01:39:23 +0000 (21:39 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 5 Jul 2017 01:39:23 +0000 (21:39 -0400)
TODO.md
lib/win.c

diff --git a/TODO.md b/TODO.md
index da354ce7eb88bedd97077d598b77058a01b71f38..6fd6a8157340107d0526be770b32d3a51681782a 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -82,31 +82,3 @@ Label, Conditional, Repeat, Character, Number, PreProc, Float, Operator, Structu
 Keyword GROUP [WORD...]
 Match   GROUP REGEX
 Region  GROUP start=REGEX skip=REGEX end=REGEX
-
-# Themes
-
-https://www.slant.co/topics/358/~best-color-themes-for-text-editors
-
-* Wily
-* badwolf
-* jelly beans
-* one dark
-* zenburn
-* railscast
-* material
-* spacemacs
-* inkpot
-* soda light
-* predawn
-* lucario
-* obsidian
-* leuven
-* afterglow
-* nord
-* plastic code wrap
-* wombat
-* noctilux
-* deep space
-* lean theme
-* cheerfully dark
-* gotham
index 3f68dc6c512ee5746b02cef6efa5e4b5413d407a..5ba621db284e19f8afb0c4afbb9722ed0cd14325 100644 (file)
--- a/lib/win.c
+++ b/lib/win.c
@@ -159,9 +159,8 @@ void win_setscroll(double offset, double visible) {
 }
 
 static size_t gutter_cols(void) {
-    size_t len   = (ShowLineNumbers ? 1 : 0),
-           lines = win_buf(EDIT)->nlines;
-    while (ShowLineNumbers && lines > 9)
+    size_t len = 0, lines = win_buf(EDIT)->nlines + 1;
+    while (ShowLineNumbers && lines)
         lines /= 10, len++;
     return len;
 }