Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haskeline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rinat Striungis
haskeline
Commits
e18a11fa
Commit
e18a11fa
authored
10 years ago
by
Philip Dexter
Browse files
Options
Downloads
Patches
Plain Diff
Fix TODO: messageState param not needed anymore
parent
bf1a30ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
System/Console/Haskeline/Command/Completion.hs
+2
-2
2 additions, 2 deletions
System/Console/Haskeline/Command/Completion.hs
System/Console/Haskeline/LineState.hs
+2
-3
2 additions, 3 deletions
System/Console/Haskeline/LineState.hs
with
4 additions
and
5 deletions
System/Console/Haskeline/Command/Completion.hs
+
2
−
2
View file @
e18a11fa
...
...
@@ -85,7 +85,7 @@ askFirst :: Monad m => Prefs -> Int -> CmdM m ()
->
CmdM
m
()
askFirst
prefs
n
cmd
|
maybe
False
(
<
n
)
(
completionPromptLimit
prefs
)
=
do
_
<-
setState
(
Message
()
$
"Display all "
++
show
n
_
<-
setState
(
Message
$
"Display all "
++
show
n
++
" possibilities? (y or n)"
)
keyChoiceCmdM
[
simpleChar
'y'
+>
cmd
...
...
@@ -96,7 +96,7 @@ askFirst prefs n cmd
pageCompletions
::
MonadReader
Layout
m
=>
[
String
]
->
CmdM
m
()
pageCompletions
[]
=
return
()
pageCompletions
wws
@
(
w
:
ws
)
=
do
_
<-
setState
$
Message
()
"----More----"
_
<-
setState
$
Message
"----More----"
keyChoiceCmdM
[
simpleChar
'
\n
'
+>
oneLine
,
simpleKey
DownKey
+>
oneLine
...
...
This diff is collapsed.
Click to expand it.
System/Console/Haskeline/LineState.hs
+
2
−
3
View file @
e18a11fa
...
...
@@ -356,10 +356,9 @@ applyCmdArg :: (InsertMode -> InsertMode) -> ArgMode CommandMode -> CommandMode
applyCmdArg
f
am
=
withCommandMode
(
repeatN
(
arg
am
)
f
)
(
argState
am
)
---------------
-- TODO: messageState param not needed anymore.
data
Message
s
=
Message
{
messageState
::
s
,
messageText
::
String
}
newtype
Message
=
Message
{
messageText
::
String
}
instance
LineState
(
Message
s
)
where
instance
LineState
Message
where
beforeCursor
_
=
stringToGraphemes
.
messageText
afterCursor
_
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment