Skip to content

Commit 24eb700

Browse files
committed
Fix readonly problem in editor
1 parent 7cada2f commit 24eb700

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IDE/Main.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ clear es s = mapM_ (\s -> setText es s "" >>
151151

152152
setText :: Editors -> (Editors -> Editor) -> String -> IO ()
153153
setText eds sel s = do
154+
ro <- styledTextCtrlGetReadOnly (sel eds)
154155
styledTextCtrlSetReadOnly (sel eds) False
155156
styledTextCtrlSetText (sel eds) s
156-
styledTextCtrlSetReadOnly (sel eds) True
157+
styledTextCtrlSetReadOnly (sel eds) ro
157158

158159
getText :: Editors -> (Editors -> Editor) -> IO String
159160
getText eds sel = styledTextCtrlGetText (sel eds)

0 commit comments

Comments
 (0)