2 Commits 59b23db584 ... fa767babf8

Autor SHA1 Nachricht Datum
  Lucy McClane fa767babf8 no third party themes mention vor 2 Jahren
  Lucy McClane 003ead8fc3 empty prev token check vor 2 Jahren
3 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen
  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;