]> git.mdlowis.com Git - projs/tide.git/commitdiff
expand the current line highlight box to full width of gutter
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 14 Jun 2017 01:20:49 +0000 (21:20 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 14 Jun 2017 01:20:49 +0000 (21:20 -0400)
TODO.md
lib/win.c

diff --git a/TODO.md b/TODO.md
index b1d89935e849185cd42e0fb5b687207395041ed9..35dd50b0cff1f1641d4b0a4a8eabf69ae0b58a33 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -4,13 +4,12 @@ Up Next:
 
 * highlight classes of identifiers
 * ^A shortcut should set implicit mark
-
-* move by words is inconsistent. Example:
-    var infoId = 'readerinfo'+reader.id;
 * Add a way to CD using a builtin (buffers will track original dir)
 * shortcut to jump to previous edit
 * add command line flags to toggle options (Tabs, Indent, etc..)
 * implement X resources config file
+* move by words is inconsistent. Example:
+    var infoId = 'readerinfo'+reader.id;
 
 The Future:
 
@@ -55,6 +54,30 @@ Maybe think about addressing these later:
 * File browser
 * Acme-like window manager
 
+# Regular Expressions
+
+Operators:
+
+    c       Literal character
+    ^       Start of string
+    $       End of string
+    .       Any char
+    [ ]     Any character in the set
+    [^ ]    Any character not in the reange
+    ( )     Grouping/matching
+
+    ?       Zero or one
+    *       Zero or more
+    +       One or more
+
+    {n,m}   From n to m matches
+    |       Alternative
+
 # Syntax Highlighting
 
 Label, Conditional, Repeat, Character, Number, PreProc, Float, Operator, Structure
+
+Keyword GROUP [WORD...]
+Match   GROUP REGEX
+Region  GROUP start=REGEX skip=REGEX end=REGEX
+
index 977139dcca2dfc294ba333c81f56f861fea17480..f17c5899b8156d7495c06ad494a291abd4c069ef 100644 (file)
--- a/lib/win.c
+++ b/lib/win.c
@@ -371,7 +371,12 @@ static void onwheeldn(WinRegion id, bool pressed, size_t row, size_t col) {
 
 static void draw_line_num(bool current, size_t x, size_t y, size_t gcols, size_t num) {
     if (ShowLineNumbers) {
-        int color = (current ? CLR_CurrentLine : CLR_GutterText);
+        int color = CLR_GutterText;
+        if (current) {
+            color = CLR_CurrentLine;
+            size_t fheight = x11_font_height(Font);
+            x11_draw_rect((color >> 8), x-3, y-fheight, gutter_size(), fheight);
+        }
         UGlyph glyphs[gcols];
         for (int i = gcols-1; i >= 0; i--) {
             glyphs[i].attr = color;