INNER CODE UNIT · Go

func

asciimoo/wuzz · wuzz.go:423

func (e *AutocompleteEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) {
	if key != gocui.KeyEnter {
		e.wuzzEditor.Edit(v, key, ch, mod)
	}

	cx, cy := v.Cursor()
	line, err := v.Line(cy)
	trimmedLine := line[:cx]

	if err != nil {
		e.wuzzEditor.Edit(v, key, ch, mod)
		return
	}

	lastSymbol := getLastSymbol(trimmedLine)
	if key == gocui.KeyEnter && e.isAutocompleting {
		currentCompletion := e.currentCompletions[0]
		shouldDelete := true

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…