aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-01-19 17:56:21 -0500
committerJustin M. Keyes <justinkz@gmail.com>2015-01-19 17:56:21 -0500
commit487d2ce74a009da1954055b3d6b7735895e2b2a1 (patch)
treeb6add0d4466b0dda9960d73d22b1312f33cf82f8 /src
parent8d93bc1a4ed890e2aef01b850f5146401ed6f1c0 (diff)
parentf44a1e1632528536cb98b5618574eb3c2281cf17 (diff)
downloadrneovim-487d2ce74a009da1954055b3d6b7735895e2b2a1.tar.gz
rneovim-487d2ce74a009da1954055b3d6b7735895e2b2a1.tar.bz2
rneovim-487d2ce74a009da1954055b3d6b7735895e2b2a1.zip
Merge pull request #1843 from JackDanger/initialize-our_paren_pos-CID-102151
coverity/102151: initialize `our_paren_pos`
Diffstat (limited to 'src')
-rw-r--r--src/nvim/indent_c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 56276db3ce..9c636ebbcc 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -1805,6 +1805,7 @@ int get_c_indent(void)
}
if (trypos != NULL) {
+ our_paren_pos = *trypos;
/*
* If the matching paren is more than one line away, use the indent of
* a previous non-empty line that matches the same paren.
@@ -1814,7 +1815,6 @@ int get_c_indent(void)
amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
} else {
amount = -1;
- our_paren_pos = *trypos;
for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum) {
l = skipwhite(ml_get(lnum));
if (cin_nocode(l)) /* skip comment lines */