Skip to content

Commit be1b1a7

Browse files
Turn signal handling on in LineEditor (#203616)
This PR was created to address jank-lang/jank#801. Without signal handling, `CLRL+C` / `CTRL+Z` leaves the terminal in an awkward state, breaking other command line tasks and forcing the user to open a new/clean terminal window. cc: @jeaye ### Edit #### AI Per the contribution policies and review practices, AI was used to locate the root cause of the issue I was seeing. From there, I personally wrote the code and manually tested the build to verify that the change fixed the problem I was seeing. #### Testing Since there were no pre-existing unit tests for this module, no additional unit tests were added for this PR. I validated the existing build/tests locally and validated the change propagated through manually.
1 parent 2732991 commit be1b1a7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

llvm/lib/LineEditor/LineEditor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ LineEditor::LineEditor(StringRef ProgName, StringRef HistoryPath, FILE *In,
209209

210210
::el_set(Data->EL, EL_PROMPT, ElGetPromptFn);
211211
::el_set(Data->EL, EL_EDITOR, "emacs");
212+
::el_set(Data->EL, EL_SIGNAL, 1);
212213
::el_set(Data->EL, EL_HIST, history, Data->Hist);
213214
::el_set(Data->EL, EL_ADDFN, "tab_complete", "Tab completion function",
214215
ElCompletionFn);

0 commit comments

Comments
 (0)