File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,6 +150,14 @@ public class Window {
150150 // Save cursor position to be restored later and move cursor to field
151151 cursor. pushPosition ( )
152152 cursor. position = fieldPosition
153+
154+ // If a fieldColorPair is specified, we turn that color on
155+ if let fieldColorPair = fieldColorPair {
156+ turnOn ( fieldColorPair)
157+ let pad = String ( repeating: " " , count: maxCharacters)
158+ write ( pad)
159+ cursor. position = fieldPosition
160+ }
153161
154162 var string = " "
155163 var insertionPoint = string. startIndex
@@ -225,6 +233,11 @@ public class Window {
225233 } while !shouldExit
226234
227235
236+ // If a fieldColorPair is specified, we turn that color off
237+ if let fieldColorPair = fieldColorPair {
238+ turnOff ( fieldColorPair)
239+ }
240+
228241 // Restore cursor position and return string
229242 cursor. popPosition ( )
230243 return string
You can’t perform that action at this time.
0 commit comments