aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-03-05 12:22:07 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-03-05 12:22:07 -0500
commit389fe57a9fcd4c9971bb9cebc8dfeb67cac6498a (patch)
tree744bbd7f550d175604f64595f89008b7760f686d /src/lpm.lua
parent4ac6bf5a4b4728abfcae7b06b30a0dd17f8735c0 (diff)
downloadlite-xl-plugin-manager-389fe57a9fcd4c9971bb9cebc8dfeb67cac6498a.tar.gz
lite-xl-plugin-manager-389fe57a9fcd4c9971bb9cebc8dfeb67cac6498a.zip
Flush input buffer before prompt.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 5307a0a..c990407 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -524,6 +524,7 @@ local function log_progress_action(message)
end
end
local function prompt(message)
+ system.tcflush(0)
if not ASSUME_YES or not JSON then
io.stderr:write(colorize(message .. " [Y/n]: ", "cyan"))
if ASSUME_YES then io.stderr:write("Y\n") end