summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKรฉvin Le Gouguec <kevin.legouguec@gmail.com>2017-02-28 19:28:44 +0100
committerKรฉvin Le Gouguec <kevin.legouguec@gmail.com>2017-02-28 19:28:44 +0100
commit3bda82d3b24b65426bc55659ce44d28b7d4596bc (patch)
treeb467d9173aedf29b2519af8c7e86489f1fcfe44b
parentd934eaa089ee8be6238399de7130d45906a88a00 (diff)
downloaddotfiles-3bda82d3b24b65426bc55659ce44d28b7d4596bc.tar.xz
Make sure the prompt works when autowrap is off
To reproduce the issue: $ echo -e '\E[?7l' (cf. console_codes(4))
-rw-r--r--.bash_prompt5
1 files changed, 5 insertions, 0 deletions
diff --git a/.bash_prompt b/.bash_prompt
index b42217f..b267dbc 100644
--- a/.bash_prompt
+++ b/.bash_prompt
@@ -170,6 +170,11 @@ __draw-rule ()
do
rule+=โ€”
done
+
+ # If we do not add a newline, the prompt will be shoved offscreen
+ # when autowrap is off.
+ rule+='\n'
+
__fontify ${rule} dim
}