summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-10-12 18:52:22 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-10-12 18:52:22 +0000
commit22bd9f90d59b9c784cc5986ca02b891eef93ee3f (patch)
tree25a72292a157317b0b52934426be813c6d540709 /src/main.cc
parentf802a9f3bea1f3b1bfe2bc13b42706a287bbd8d5 (diff)
Filters: add an expand_tabulation filter
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index e7693a8a..04a845a9 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -85,7 +85,8 @@ void draw_window(Window& window)
WindowCoord position;
for (const DisplayAtom& atom : window.display_buffer())
{
- const std::string content = window.buffer().string(atom.begin, atom.end);
+ const std::string content = atom.replacement_text.empty() ?
+ window.buffer().string(atom.begin, atom.end) : atom.replacement_text;
set_attribute(A_UNDERLINE, atom.attribute & Underline);
set_attribute(A_REVERSE, atom.attribute & Reverse);