diff --git a/highlight.h b/highlight.h index a069ac1e2..f6e242099 100644 --- a/highlight.h +++ b/highlight.h @@ -28,6 +28,7 @@ enum highlight_spec_quote, //quoted string highlight_spec_redirection, //redirection highlight_spec_autosuggestion, //autosuggestion + highlight_spec_selection, HIGHLIGHT_SPEC_PRIMARY_MASK = 0xFF, @@ -50,12 +51,6 @@ inline highlight_spec_t highlight_make_background(highlight_spec_t val) return val << 16; } - -/** - Internal value representing highlighting an active selection -*/ -#define HIGHLIGHT_SELECTION 0x80 - class history_item_t; struct file_detection_context_t; diff --git a/reader.cpp b/reader.cpp index 1e57d820e..42469897c 100644 --- a/reader.cpp +++ b/reader.cpp @@ -575,7 +575,7 @@ static void reader_repaint() if(data->sel_active) { - int selection_color = HIGHLIGHT_SELECTION << 16; + highlight_spec_t selection_color = highlight_make_background(highlight_spec_selection); for(int i = data->sel_start_pos; i <= std::min(len - 1, data->sel_stop_pos); i++) { colors[i] = selection_color;