1. Oct 12, 2023
  2. Aug 20, 2023
  3. Apr 30, 2023
    • Adam Saponara's avatar
      simplify syntax highlighting code · 7231152c
      Adam Saponara authored
      this is a rewrite of the syntax highlighting code. overall it's a
      salmon-colored patch (deleted more than added), the code is easier to
      follow, and it fixes some long-standing bugs.
      
      as noted in the readme, there was a bug involving overlapping rules.
      the most annoying instance of this bug was with strings containing a
      `/*` such as in glob patterns. for example:
      
      ```
      "match/this/path/*"
      ```
      
      with `syn_generic` applied, we used to interpret `/*` as the
      beginning of a multi-line comment, and therefore the rest of the file
      (or until there happened to be a closing `*/` somewhere). this
      bothered me for a very long time.
      
      this bug was due to how we used to apply rules. each rule would get
      applied one after the other, each from the beginning of the line. the
      last rule to style any given span of text superseded any previous
      rules that matched.
      
      in the rewrite, once a rule matches a span of text, we don't try to
      style that span anymore (until the text is edited of course).
      
      the one downside is that this seems to be slightly less performant.
      on my machine, applying `syn_generic` is about 5% slower, but it's
      still generally fast enough that you'd only start to notice the
      difference if you were opening massive files, tens or hundreds of
      megabytes large, with syntax highlighting on. a memo field was added
      (`smemo_t`) which drastically improved perf. there are probably
      further perf optimizations to be had.
      
      i added a couple more functional tests, on top of the existing ones,
      to exercise some edge cases of syntax highlighting. as always please
      report bugs if you find any.
      7231152c
  4. Jul 17, 2022
  5. Jul 15, 2022
  6. Jun 02, 2022
  7. May 28, 2022
  8. Sep 07, 2021
    • Adam Saponara's avatar
      switch to embedded version of termbox2. · f1c22932
      Adam Saponara authored
      consider this an unstable commit. termbox2 is a
      line-by-line rewrite of termbox with some extra features,
      more flexibility, stricter error handling, and a more
      consistent api. it's also redesigned as a single-file
      header library. this makes it easy to copy-paste into
      other projects, which is what i've done here. at the time
      of writing, the canonical termbox2 repo is here:
      
      https://github.com/termbox/termbox2
      f1c22932
  9. Jun 28, 2021
  10. Mar 07, 2021
  11. Sep 27, 2020
  12. Jul 21, 2020
  13. Dec 29, 2019
  14. Nov 18, 2019
  15. Dec 28, 2018
  16. Dec 22, 2018
  17. Dec 21, 2018
  18. Sep 06, 2018
  19. Sep 03, 2018
  20. Aug 25, 2018
  21. Mar 08, 2018
  22. Mar 07, 2018
  23. Feb 26, 2018
  24. Feb 25, 2018
  25. Feb 21, 2018
  26. Feb 13, 2018
  27. Jan 30, 2018
  28. Dec 08, 2017
  29. Aug 14, 2017
  30. May 01, 2017
  31. Apr 16, 2017
  32. Apr 13, 2017
  33. Apr 12, 2017