on master help sign in
attributeControl: document which constructors map to which terminal mode flags
commit620a5ca5441e66857c9f957370b855ad2c63e200 authorJonathan Daugherty <cygnus@foobox.com> dateThu 9 Jul 2020, 14:07 (6 years ago) parent95cabe0
1 file changed+6−3
src/Graphics/Vty/Input/Loop.hs+6−3
src/Graphics/Vty/Input/Loop.hs+6−3
@@ -201,10 +201,13 @@ attributeControl fd = do
201201 original <- getTerminalAttributes fd
202202 let vtyMode = foldl withMode clearedFlags flagsToSet
203203 clearedFlags = foldl withoutMode original flagsToUnset
204− flagsToSet = [ MapCRtoLF
204+ flagsToSet = [ MapCRtoLF -- ICRNL
205205 ]
206− flagsToUnset = [ StartStopOutput, KeyboardInterrupts
207− , EnableEcho, ProcessInput, ExtendedFunctions
206+ flagsToUnset = [ StartStopOutput -- IXON
207+ , KeyboardInterrupts -- ISIG
208+ , EnableEcho -- ECHO
209+ , ProcessInput -- ICANON
210+ , ExtendedFunctions -- IEXTEN
208211 ]
209212 let setAttrs = setTerminalAttributes fd vtyMode Immediately
210213 unsetAttrs = setTerminalAttributes fd original Immediately