aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-08 13:41:12 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-08 13:41:12 -0800
commitdd0cc5ed9fa60f4bae5530d1708a2974eb0c454f (patch)
tree05f9a1c63c48f18ca688e6485d64afa0018b1013 /reader.cpp
parenta23441109deebe703a436968294966abbca64cb6 (diff)
Rewriting indenting functionality to use new parser
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/reader.cpp b/reader.cpp
index a09a0bda..ac0e52f5 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -519,7 +519,14 @@ wcstring combine_command_and_autosuggestion(const wcstring &cmdline, const wcstr
static void reader_repaint()
{
// Update the indentation
- parser_t::principal_parser().test(data->command_line.c_str(), &data->indents[0]);
+ if (0)
+ {
+ parser_t::principal_parser().test(data->command_line.c_str(), &data->indents[0]);
+ }
+ else
+ {
+ data->indents = parse_util_compute_indents(data->command_line);
+ }
// Combine the command and autosuggestion into one string
wcstring full_line = combine_command_and_autosuggestion(data->command_line, data->autosuggestion);