add style from #691 to ide menu (#722)

* get correct cursor pos when menu indicator contains newline

* add tests

* fix cursor pos in multiline prompt

* make description mode enum public

* add doc comment

* respect windows newline in update_values

* Revert "respect windows newline in update_values"

This reverts commit 070d600545.

* add complete_with_base_ranges to Completer

* add builder for correct_cursor_pos

* add config options to completion examples

* add style to ide menu

* run fmt

* start menu refactor

* Revert "start menu refactor"

This reverts commit 62726f29be.
This commit is contained in:
maxomatic458 2024-01-26 02:25:32 +01:00 committed by GitHub
parent 3f6f0d1c3d
commit 03a1baba6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -559,8 +559,13 @@ impl IdeMenu {
if use_ansi_coloring {
if index == self.index() {
format!(
"{}{}{}{}{}{}{}",
"{}{}{}{}{}{}{}{}",
vertical_border,
suggestion
.style
.unwrap_or(self.color.text_style)
.reverse()
.prefix(),
self.color.selected_text_style.prefix(),
" ".repeat(padding),
string,
@ -572,7 +577,7 @@ impl IdeMenu {
format!(
"{}{}{}{}{}{}{}",
vertical_border,
self.color.text_style.prefix(),
suggestion.style.unwrap_or(self.color.text_style).prefix(),
" ".repeat(padding),
string,
" ".repeat(padding_right),