diff options
| author | historia <[not public]> | 2026-06-27 02:29:55 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-27 02:29:55 -0400 |
| commit | 6f3d21d6e7f01155ce0c461857a053b43d329392 (patch) | |
| tree | 51e96b62deb5f99a3d70c3a15ab94c520a1ee8e8 /internal/net/server.go | |
| parent | 3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5 (diff) | |
| download | thehouseoficarus-6f3d21d6e7f01155ce0c461857a053b43d329392.tar.gz | |
feat: recall/home cmd, line break option
Diffstat (limited to 'internal/net/server.go')
| -rw-r--r-- | internal/net/server.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/net/server.go b/internal/net/server.go index 731beef..8114df2 100644 --- a/internal/net/server.go +++ b/internal/net/server.go @@ -344,6 +344,14 @@ func (sess *Session) wrap(msg string) string { return color.WrapANSI(msg, width) } +// ClearPrompt marks the prompt as consumed so the next Write/WriteLine does not +// emit a leading \r\n. Useful for clients that locally advance the line on Enter. +func (sess *Session) ClearPrompt() { + sess.writeMu.Lock() + defer sess.writeMu.Unlock() + sess.promptVisible = false +} + // Write sends raw text with no wrapping. Used for prompts and partial lines. func (sess *Session) Write(msg string) { sess.writeMu.Lock() |
