Bug Description
When a user enters multi-line content (e.g., two lines of text with a newline) in iac-code and then exits the program, pressing the up arrow key (↑) to recall history after reopening iac-code only recalls one line at a time, instead of recalling the entire multi-line input as a single history entry.
Steps to Reproduce
- Run
iac-code
- Enter multi-line content (e.g., two lines of text with a newline) and submit
- Exit iac-code (Ctrl+C or normal exit)
- Reopen
iac-code
- Press the up arrow key (↑) to recall the previous input
Expected Behavior
Pressing the up arrow key should recall the previous multi-line input as a complete history entry, restoring the full multi-line content at once.
Actual Behavior
Pressing the up arrow key only recalls the last line of the multi-line input (or recalls line by line), instead of treating the entire multi-line input as a single history entry.
Operating System
macOS
Python Version
3.12.7
iac-code Version
0.3.0
Additional Context
This issue is likely related to how newline characters are handled when saving history. Multi-line inputs may be stored line-by-line in the history file, causing them to be treated as separate entries during recall.
Bug Description
When a user enters multi-line content (e.g., two lines of text with a newline) in iac-code and then exits the program, pressing the up arrow key (↑) to recall history after reopening iac-code only recalls one line at a time, instead of recalling the entire multi-line input as a single history entry.
Steps to Reproduce
iac-codeiac-codeExpected Behavior
Pressing the up arrow key should recall the previous multi-line input as a complete history entry, restoring the full multi-line content at once.
Actual Behavior
Pressing the up arrow key only recalls the last line of the multi-line input (or recalls line by line), instead of treating the entire multi-line input as a single history entry.
Operating System
macOS
Python Version
3.12.7
iac-code Version
0.3.0
Additional Context
This issue is likely related to how newline characters are handled when saving history. Multi-line inputs may be stored line-by-line in the history file, causing them to be treated as separate entries during recall.