@@ -5,11 +5,9 @@ import (
55 "strings"
66
77 "github.com/reeflective/readline/inputrc"
8- "github.com/reeflective/readline/internal/color"
98 "github.com/reeflective/readline/internal/completion"
109 "github.com/reeflective/readline/internal/core"
1110 "github.com/reeflective/readline/internal/history"
12- "github.com/reeflective/readline/internal/strutil"
1311 "github.com/reeflective/readline/internal/term"
1412 "github.com/reeflective/readline/internal/ui"
1513)
@@ -249,51 +247,6 @@ func (e *Engine) computeCoordinates(suggested bool) {
249247 e .primaryPrinted = false
250248}
251249
252- func (e * Engine ) displayLine () {
253- var line string
254-
255- // Apply user-defined highlighter to the input line.
256- if e .highlighter != nil {
257- line = e .highlighter (* e .line )
258- } else {
259- line = string (* e .line )
260- }
261-
262- // Highlight matching parenthesis
263- if e .opts .GetBool ("blink-matching-paren" ) {
264- core .HighlightMatchers (e .selection )
265- defer core .ResetMatchers (e .selection )
266- }
267-
268- // Apply visual selections highlighting if any
269- line = e .highlightLine ([]rune (line ), * e .selection )
270-
271- // Get the subset of the suggested line to print.
272- suggestionAdded := false
273- if len (e .suggested ) > e .line .Len () && e .opts .GetBool ("history-autosuggest" ) {
274- line += color .Dim + color .Fmt (color .Fg + "242" ) + string (e .suggested [e .line .Len ():]) + color .Reset
275- suggestionAdded = true
276- }
277-
278- currentLine := string (* e .line )
279- if ! suggestionAdded && e .inlineSuggestionApplies (currentLine ) {
280- line += color .Dim + color .Fmt (color .Fg + "242" ) + e .inline [len (currentLine ):] + color .Reset
281- }
282-
283- // Format tabs as spaces, for consistent display
284- line = strutil .FormatTabs (line ) + term .ClearLineAfter
285-
286- // And display the line.
287- e .suggested .Set ([]rune (line )... )
288- core .DisplayLine (& e .suggested , e .startCols )
289-
290- // Adjust the cursor if the line fits exactly in the terminal width.
291- if e .lineCol == 0 {
292- term .WriteString (term .NewlineReturn )
293- term .WriteString (term .ClearLineAfter )
294- }
295- }
296-
297250// AvailableHelperLines returns the number of lines available below the hint section.
298251// It returns half the terminal space if we currently have less than 1/3rd of it below.
299252func (e * Engine ) AvailableHelperLines () int {
0 commit comments