[PATCH] [llgo] cmd/llgoi: use line editor

Andrew Wilkins axwalk at gmail.com
Thu May 21 22:15:00 PDT 2015


Sorry, just realised I hadn't submitted my replies. PTAL.


================
Comment at: cmd/llgoi/llgoi.go:503
@@ +502,3 @@
+		if in.pendingLine.ready() && buf.Len() > 0 {
+			in.liner.AppendHistory(buf.String())
+			buf.Reset()
----------------
pcc wrote:
> It doesn't look like liner deals with multi-line history entries very well. (e.g. try typing "{<nl>}<nl><up>" and then editing the line). Can we maybe strip newlines and apply semicolon insertion where necessary instead of saving the literal newlines?
I've done that now. Lines are collapsed, and semicolons (added by go/scanner) are written where necessary.

================
Comment at: cmd/llgoi/llgoi.go:522
@@ -521,3 @@
-	if tty {
-		os.Stdout.WriteString("\n")
-	}
----------------
pcc wrote:
> It looks like liner doesn't do this for us, so we probably need to keep doing it ourselves.
Reinstated.

http://reviews.llvm.org/D9811

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list