Skip to content

Commit

Permalink
add style from #691 to ide menu (#722)
Browse files Browse the repository at this point in the history
* 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 070d600.

* 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 62726f2.
  • Loading branch information
maxomatic458 authored Jan 26, 2024
1 parent 3f6f0d1 commit 03a1bab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/menu/ide_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
Expand Down

0 comments on commit 03a1bab

Please sign in to comment.