File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -173,12 +173,19 @@ appDraw Model{visibleNotes, openNoteM} = [mainWidget <=> keysHelpLine]
173173 & withBorderIf (focusedWidget == OpenNoteViewport )
174174
175175 keysHelpLine =
176- withAttr highlightAttr (txt " ^q" )
177- <+> txt " "
178- <+> withAttr highlightAttr (txt " Esc" )
179- <+> txt " exit "
180- <+> withAttr highlightAttr (txt " Enter" )
181- <+> txt " open"
176+ case focusedWidget of
177+ NoteList ->
178+ withAttr highlightAttr (txt " ^q" )
179+ <+> txt " "
180+ <+> withAttr highlightAttr (txt " Esc" )
181+ <+> txt " exit "
182+ <+> withAttr highlightAttr (txt " Enter" )
183+ <+> txt " open"
184+ OpenNoteViewport ->
185+ withAttr highlightAttr (txt " ^q" )
186+ <+> txt " exit "
187+ <+> withAttr highlightAttr (txt " Esc" )
188+ <+> txt " close"
182189
183190highlightAttr :: AttrName
184191highlightAttr = attrName " highlight"
@@ -198,8 +205,8 @@ appHandleVtyEvent event = do
198205 case focusedWidget of
199206 NoteList ->
200207 case event of
201- EvKey KEsc [] -> halt
202208 EvKey (KChar ' q' ) [MCtrl ] -> halt
209+ EvKey KEsc [] -> halt
203210 EvKey KEnter [] -> do
204211 -- open selected note
205212 selectedNoteM <-
@@ -208,10 +215,11 @@ appHandleVtyEvent event = do
208215 e -> zoom # visibleNotes $ handleListEvent e
209216 OpenNoteViewport ->
210217 case event of
218+ EvKey (KChar ' q' ) [MCtrl ] -> halt
211219 EvKey KEsc [] ->
212220 -- close note view
213221 # openNoteM .= Nothing
214- _ -> pure () -- e -> zoom (#openNoteM . _Just) $ handleViewport e
222+ _ -> pure () -- TODO e -> zoom (#openNoteM . _Just) $ handleViewport e
215223
216224renderListItem :: Bool -> EntityDoc Note -> Widget
217225renderListItem _isSelected Entity {entityVal} = txt $ noteTitle entityVal
You can’t perform that action at this time.
0 commit comments