about summary refs log tree commit diff stats
path: root/src/local/lineedit.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-22 13:14:36 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-22 13:37:13 +0200
commite23fa780cf2fff7146efcd64b2806ce428858b80 (patch)
tree1c27dc0a50c03bc1d4348d9b96328009e0adce8f /src/local/lineedit.nim
parent9386feca5e39b89676dd410f6331553c37434239 (diff)
downloadchawan-e23fa780cf2fff7146efcd64b2806ce428858b80.tar.gz
pager: improve hover text handling
* align status truncating behavior with w3m (not exactly, clipping
  is still different, but this should be fine for now)
* add "su" for "show last alert"
	- w3m's solution here is to scroll one char at a time with
	  "u", but that's extremely annoying to use. We already have a
	  line editor that can navigate lines, so reuse that instead.
* fix peekCursor showing empty text
* update todo
Diffstat (limited to 'src/local/lineedit.nim')
-rw-r--r--src/local/lineedit.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/local/lineedit.nim b/src/local/lineedit.nim
index edb6ee09..2f998b84 100644
--- a/src/local/lineedit.nim
+++ b/src/local/lineedit.nim
@@ -18,7 +18,7 @@ type
     lesEdit, lesFinish, lesCancel
 
   LineHistory* = ref object
-    lines: seq[string]
+    lines*: seq[string]
 
   LineEdit* = ref object
     news*: string
@@ -299,6 +299,7 @@ proc nextHist(edit: LineEdit) {.jsfunc.} =
     edit.begin()
     edit.end()
     edit.histtmp = ""
+    edit.redraw = true
 
 proc windowChange*(edit: LineEdit; attrs: WindowAttributes) =
   edit.maxwidth = attrs.width - edit.promptw - 1
ef='#n161'>161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231