-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Description
When updating Reline.completion_append_character
in Reline.completion_proc
, the change does not get reflected until you enter a new Reline.readline
or Reline.readmultiline
context. It seems like the value of Reline.completion_append_character
and Reline.line_editor.completion_append_character
is out of sync.
Scenario: We are updating the value of Reline.completion_append_character = ' '
inside of the completion_proc
, but it's not reflecting in the line_editor
Expected Behaviour
Being able to change Reline.completion_append_character
in the completion proc and have it update the line_editor
.
i.e. this code:
Lines 83 to 93 in 7534f7f
def completion_append_character=(val) | |
if val.nil? | |
@completion_append_character = nil | |
elsif val.size == 1 | |
@completion_append_character = val.encode(encoding) | |
elsif val.size > 1 | |
@completion_append_character = val[0].encode(encoding) | |
else | |
@completion_append_character = nil | |
end | |
end |
To immediately update the line_editor's completion_append_character
value
def completion_append_character=(val)
if val.nil?
@completion_append_character = nil
elsif val.size == 1
@completion_append_character = val.encode(encoding)
elsif val.size > 1
@completion_append_character = val[0].encode(encoding)
else
@completion_append_character = nil
end
# Ensure the line_editor is updated too:
line_editor.completion_append_character = @completion_append_character
end
Current Behaviour
Changing Reline.completion_append_character
in Reline.completion_append_character
does not take effect until a new call to Reline.readline
.
Terminal Emulator
MacOS
Reline Version
0.5.10