From 7d009e0ca4a1af10cc6d31fb5982e38dcab9ee71 Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Mon, 22 Jan 2024 23:46:37 +0100 Subject: feat: add support for rendering text (i.e. tabs) This allows to have differences between the "raw" content of the buffer and its visualization on screen. At the time of writing this handles the rendering of tabs (i.e. '\t') as a fixed amount of spaces, but will be useful for syntax highlighting as well. --- lib/key.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/key.ml') diff --git a/lib/key.ml b/lib/key.ml index 85aa282..d6656c5 100644 --- a/lib/key.ml +++ b/lib/key.ml @@ -16,6 +16,7 @@ type key = | Nul | Page_down | Page_up + | Tab type t = key @@ -24,6 +25,7 @@ let key c = Key c let of_char = function | '\000' -> Nul + | '\009' -> Tab | '\013' -> Enter | '\027' -> Esc | '\127' -> Backspace -- cgit v1.2.3