terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix crashes from having crlf line endings

+11 -1
+5 -1
forks/notty/src/notty.ml
··· 11 11 let max (a : int) b = if a > b then a else b 12 12 let min (a : int) b = if a < b then a else b 13 13 14 - let is_C0 x = (x < 0x20 || x = 0x7f) && x!= 0x09 14 + (** 15 + checks to see if x is any of the early control codes, excluding some whitespace like 16 + 0x09 = lf 17 + *) 18 + let is_C0 x = (x < 0x20 || x = 0x7f) && x!= 0x09 15 19 and is_C1 x = 0x80 <= x && x < 0xa0 16 20 let is_ctrl x = is_C0 x || is_C1 x 17 21 and is_ascii x = x < 0x80
+6
jj_tui/lib/ansiReverse.ml
··· 140 140 ;; 141 141 142 142 let string_to_image ?(extra_attr = A.empty) str = 143 + let str= 144 + (* replace any carrriage returns becasue notty doesn't know what to do with them*) 145 + Base.String.Search_pattern.replace_all (Base.String.Search_pattern.create "\r\n") ~in_:str ~with_:"\n" 146 + |> 147 + Base.String.Search_pattern.replace_all (Base.String.Search_pattern.create "\r") ~with_:"\n" 148 + in 143 149 match parse_ansi_escape_codes str with 144 150 | Error a -> 145 151 Printf.printf "restut: %s" a;