Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d447dbf

Browse files
committed
Handle tabs after closing brace in first column with less indenting.
1 parent 158129b commit d447dbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/pgindent/pgindent

+4-4
Original file line numberDiff line numberDiff line change
@@ -1454,12 +1454,15 @@ do
14541454
cat /tmp/$$
14551455
fi
14561456
cat /tmp/$$a |
1457+
# remove tabs and retab with four spaces
1458+
detab -t8 -qc |
1459+
entab -t4 -qc |
14571460
sed 's;^/\*\(DATA(.*\)\*/$;\1;' |
14581461
sed 's;^/\*\(CATALOG(.*\)\*/$;\1;' |
14591462
sed 's;/\*---X_X;/* ---;g' |
14601463
# workaround indent bug
14611464
sed 's;^static[ ][ ]*;static ;g' |
1462-
sed 's;^}[ ][ ]*;} ;' |
1465+
sed 's;^} *;} ;' |
14631466
# pull in #endif comments
14641467
sed 's;^#endif[ ][ ]*/\*;#endif /*;' |
14651468
# work around #else indenting next line if #ifdef defines variables at top
@@ -1473,9 +1476,6 @@ do
14731476
}
14741477
else print $0;
14751478
}' |
1476-
# remove tabs and retab with four spaces
1477-
detab -t8 -qc |
1478-
entab -t4 -qc |
14791479
# add space after comments that start on tab stops
14801480
sed 's;\([^ ]\)\(/\*.*\*/\)$;\1 \2;' |
14811481
# move trailing * in function return type

0 commit comments

Comments
 (0)