summaryrefslogtreecommitdiff
path: root/vis/insert-mode/autoindent.ref
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-17 13:36:54 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-17 13:36:54 +0100
commit930cf2ab0b872539c59e7702042692f7638d4e89 (patch)
tree1a11d5770310a3ed30874c882a09219bf929d532 /vis/insert-mode/autoindent.ref
parent1c4b748a508552358d5654412389636029257c29 (diff)
test/vis: add some more tests
Diffstat (limited to 'vis/insert-mode/autoindent.ref')
-rw-r--r--vis/insert-mode/autoindent.ref21
1 files changed, 21 insertions, 0 deletions
diff --git a/vis/insert-mode/autoindent.ref b/vis/insert-mode/autoindent.ref
new file mode 100644
index 0000000..6668daf
--- /dev/null
+++ b/vis/insert-mode/autoindent.ref
@@ -0,0 +1,21 @@
+int foo(int a) {
+
+ // optimized loop
+ for (;;) {
+
+ if (a > 0) {
+ // positive
+
+ return --a;
+ } else if (a < 0) {
+ // negative
+
+ return ++a;
+ } else {
+ // equal
+
+ return a;
+ }
+
+ }
+}