mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-23 09:36:31 -05:00
In C mode, insure indentation is correct when inserting newline at end of white lines.
This commit is contained in:
parent
15e5796426
commit
998559464b
4
random.c
4
random.c
@ -547,8 +547,8 @@ static int cinsert(void)
|
|||||||
cptr = &curwp->w_dotp->l_text[0];
|
cptr = &curwp->w_dotp->l_text[0];
|
||||||
|
|
||||||
/* check for a brace */
|
/* check for a brace */
|
||||||
tptr = curwp->w_doto - 1;
|
tptr = curwp->w_doto ;
|
||||||
bracef = (cptr[tptr] == '{');
|
bracef = (tptr > 0) && (cptr[ tptr - 1] == '{') ;
|
||||||
|
|
||||||
/* save the indent of the previous line */
|
/* save the indent of the previous line */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user