]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed a bug with copyindent where it only copied indent from lines with non-whitespac...
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 2 Dec 2016 18:59:23 +0000 (13:59 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 2 Dec 2016 18:59:23 +0000 (13:59 -0500)
TODO.md
libedit/buf.c

diff --git a/TODO.md b/TODO.md
index 0f82b2372ebff5c479927088741e646f34ffa3d2..d05a861247b423c4fa9b6eaf5d1143a71f9aa65a 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -38,4 +38,3 @@
 * Spell checker integration
 * Syntax highlighting
 * Implement full featured regex engine
-
index 0d7553da96587e80b8f7d3fdc160c0479f901f0b..d0e38c070ddaa0be9167badd23ea24281782287a 100644 (file)
@@ -156,7 +156,7 @@ static void clear_redo(Buf* buf) {
 
 static unsigned getindent(Buf* buf, unsigned off) {
     off = buf_bol(buf, off);
-    for (; off < buf_end(buf) && isspace(buf_get(buf, off)); off++);
+    for (; off < buf_end(buf) && (' ' == buf_get(buf, off) || '\t' == buf_get(buf, off)); off++);
     return buf_getcol(buf, off) / TabWidth;
 }