add TODOs
This commit is contained in:
parent
2fffb11a69
commit
f1602d0fb0
|
@ -12,6 +12,7 @@ type Scroll* = ref object
|
||||||
x, y: int
|
x, y: int
|
||||||
|
|
||||||
proc render*(textBuffer: TextBuffer, termBuffer: Buffer, prompt: string, scroll: Scroll) =
|
proc render*(textBuffer: TextBuffer, termBuffer: Buffer, prompt: string, scroll: Scroll) =
|
||||||
|
# TODO: vertical scroll
|
||||||
# we are free to "redraw" everything everytime
|
# we are free to "redraw" everything everytime
|
||||||
# since termBuffer double buffers
|
# since termBuffer double buffers
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ proc enter*(buf: TextBuffer) =
|
||||||
proc newLine*(buf: TextBuffer) =
|
proc newLine*(buf: TextBuffer) =
|
||||||
# inserts a new empty line below the current one
|
# inserts a new empty line below the current one
|
||||||
# and moves cursor to it
|
# and moves cursor to it
|
||||||
|
# TODO fix crash
|
||||||
inc buf.cursorY
|
inc buf.cursorY
|
||||||
buf.content.insert(@[], buf.cursorY)
|
buf.content.insert(@[], buf.cursorY)
|
||||||
buf.cursorX = 0
|
buf.cursorX = 0
|
||||||
|
|
Loading…
Reference in New Issue