Make editor always start at the end of the first line
This commit is contained in:
parent
769bd02658
commit
817b0a34c4
2 changed files with 3 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ dependencies:
|
||||||
- brick
|
- brick
|
||||||
- containers
|
- containers
|
||||||
- text
|
- text
|
||||||
|
- text-zipper
|
||||||
- transformers
|
- transformers
|
||||||
- vty
|
- vty
|
||||||
- websockets
|
- websockets
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ module Forest.Client.NodeEditor
|
||||||
import Brick
|
import Brick
|
||||||
import Brick.Widgets.Edit
|
import Brick.Widgets.Edit
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
import Data.Text.Zipper
|
||||||
import qualified Graphics.Vty as Vty
|
import qualified Graphics.Vty as Vty
|
||||||
|
|
||||||
import Forest.Client.ResourceName
|
import Forest.Client.ResourceName
|
||||||
|
|
@ -26,7 +27,7 @@ asReply = neReply
|
||||||
|
|
||||||
editNode :: T.Text -> NodeEditor
|
editNode :: T.Text -> NodeEditor
|
||||||
editNode text = NodeEditor
|
editNode text = NodeEditor
|
||||||
{ neEditor = editorText RnEditor (Just 1) text
|
{ neEditor = applyEdit gotoEOL $ editorText RnEditor (Just 1) text
|
||||||
, neReply = False
|
, neReply = False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue