Skip to content

Multiline rendering bug #91

@liamg

Description

@liamg

I'm using multiline rendering via AcceptMultiline, and while the input is correctly received, when I input multiple lines, the lines aren't rendered properly once I input more than two lines.

The issue can be reproduced with this minimal example:

package main

import (
	"strings"

	"github.com/reeflective/readline"
)

func main() {
	bashMultiline := func(line []rune) (accept bool) {
		if strings.HasSuffix(string(line), "\\") {
			return false
		}

		return true
	}
	
	shell := readline.NewShell()
	shell.AcceptMultiline = bashMultiline

	shell.Readline()
}

Keep hitting backslash and enter and you'll see some weird rendering issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions