summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autotab.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/autotab.c b/autotab.c
index 0ff3f8f..804c657 100644
--- a/autotab.c
+++ b/autotab.c
@@ -5,7 +5,7 @@
* it as a Vim command to set up the tabstop, shiftwidth and expandtab
* parameters.
*
- * Copyright 2007-2020
+ * Copyright 2007-2022
* Kaz Kylheku <kaz@kylheku.com>
* Vancouver, Canada
*
@@ -43,7 +43,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define AUTOTAB_VER 6
+#define AUTOTAB_VER 7
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -658,7 +658,7 @@ static int determine_shiftwidth(line_t *lines_in, int tabsize, int munged)
}
}
- /* The indent_history turned up nothing; maybe the file
+ /* The indent histogram turned up nothing; maybe the file
only has one level of indentation, with no deeper nesting. */
if (max_hist == 0) {
for (i = 2; i <= 8; i++) {
@@ -776,6 +776,8 @@ int main(int argc, char **argv)
if (!expandtabs)
expandtabs = determine_expandtab(lines, tabsize, shiftwidth);
+ else
+ tabsize = shiftwidth;
out_default:
printf("tabstop=%d shiftwidth=%d %sexpandtab\n", tabsize, shiftwidth,