2 Commits 59b23db584 ... fa767babf8

Author SHA1 Message Date
  Lucy McClane fa767babf8 no third party themes mention 2 years ago
  Lucy McClane 003ead8fc3 empty prev token check 2 years ago
3 changed files with 8 additions and 4 deletions
  1. 2 2
      README.md
  2. 1 1
      configure.ac
  3. 5 1
      libhighlight/tokenizer.c

+ 2 - 2
README.md

@@ -111,8 +111,8 @@ filetype *.md
   <kbd>-</kbd>    | Zoom text out
   <kbd>=</kbd>    | Reset zoom
   <kbd>0</kbd>    | Default theme
-  <kbd>1</kbd>    | github-light theme
-  <kbd>2</kbd>    | github-dark theme
+  <kbd>1</kbd>    | Light theme
+  <kbd>2</kbd>    | Dark theme
 
 ## Using Mouse
 

+ 1 - 1
configure.ac

@@ -15,7 +15,7 @@
 # This file is a part of litemdview project
 # https://notabug.org/g0tsu/litemdview
 
-AC_INIT(litemdview, 0.0.30)
+AC_INIT(litemdview, 0.0.31)
 AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
 
 AC_PROG_CC

+ 5 - 1
libhighlight/tokenizer.c

@@ -29,7 +29,9 @@ static hl_node * hl_token_find_prev(hl_node *node) {
 }
 
 static void hl_token_check_function(hl_node *node) {
-  if (hl_token_find_prev(node)->type == HL_NODE_TYPE)
+  hl_node *prev = hl_token_find_prev(node);
+
+  if (prev && node->type == HL_NODE_TYPE)
     node->type = HL_NODE_FUNCTION;
   else if (node->type == 0)
     node->type = HL_NODE_FUNCTION_CALL;
@@ -116,6 +118,8 @@ void hl_next_word(char *word, int len, hl_node *node, hl_ctx *ctx) {
   node->text = strdup(word);
   node->text_len = len;
 
+  puts(word);
+
   if (len == 1) {
     hl_token_single(word[0], node, ctx);
     return;