aboutsummaryrefslogtreecommitdiffhomepage
path: root/screen.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-15 01:01:25 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-15 01:01:25 -0800
commite2fe8730496eb8019e8f8ace211eeaa596534942 (patch)
treed8e83c418267ac9d03864d7cfc73287d7de96c79 /screen.h
parent9da3d890e4af72b0ca231e9f4f208c3eb2b7d674 (diff)
Change highlight colors from a bitmask into a combination enum / bitmask
so that we can support more than 16 color specifications.
Diffstat (limited to 'screen.h')
-rw-r--r--screen.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/screen.h b/screen.h
index ef74383d..96f9706a 100644
--- a/screen.h
+++ b/screen.h
@@ -13,6 +13,7 @@
#define FISH_SCREEN_H
#include <vector>
+#include "highlight.h"
/**
A class representing a single line of a screen.
@@ -20,7 +21,7 @@
struct line_t
{
std::vector<wchar_t> text;
- std::vector<int> colors;
+ std::vector<highlight_spec_t> colors;
bool is_soft_wrapped;
line_t() : text(), colors(), is_soft_wrapped(false)
@@ -33,7 +34,7 @@ struct line_t
colors.clear();
}
- void append(wchar_t txt, int color)
+ void append(wchar_t txt, highlight_spec_t color)
{
text.push_back(txt);
colors.push_back(color);
@@ -49,7 +50,7 @@ struct line_t
return text.at(idx);
}
- int color_at(size_t idx) const
+ highlight_spec_t color_at(size_t idx) const
{
return colors.at(idx);
}
@@ -187,7 +188,7 @@ void s_write(screen_t *s,
const wcstring &right_prompt,
const wcstring &commandline,
size_t explicit_len,
- const int *colors,
+ const highlight_spec_t *colors,
const int *indent,
size_t cursor_pos);