@@ -739,7 +739,8 @@ vim_str2rb_enc_str(const char *s)
739739 {
740740 enc = rb_enc_find ((char * )sval );
741741 vim_free (sval );
742- if (enc ) {
742+ if (enc )
743+ {
743744 return rb_enc_str_new (s , strlen (s ), enc );
744745 }
745746 }
@@ -781,19 +782,23 @@ void ex_rubydo(exarg_T *eap)
781782 {
782783 if (u_save (eap -> line1 - 1 , eap -> line2 + 1 ) != OK )
783784 return ;
784- for (i = eap -> line1 ; i <= eap -> line2 ; i ++ ) {
785+ for (i = eap -> line1 ; i <= eap -> line2 ; i ++ )
786+ {
785787 VALUE line ;
786788
787789 line = vim_str2rb_enc_str ((char * )ml_get (i ));
788790 rb_lastline_set (line );
789791 eval_enc_string_protect ((char * ) eap -> arg , & state );
790- if (state ) {
792+ if (state )
793+ {
791794 error_print (state );
792795 break ;
793796 }
794797 line = rb_lastline_get ();
795- if (!NIL_P (line )) {
796- if (TYPE (line ) != T_STRING ) {
798+ if (!NIL_P (line ))
799+ {
800+ if (TYPE (line ) != T_STRING )
801+ {
797802 EMSG (_ ("E265: $_ must be an instance of String" ));
798803 return ;
799804 }
@@ -906,7 +911,8 @@ static void error_print(int state)
906911#define TAG_FATAL 0x8
907912#define TAG_MASK 0xf
908913
909- switch (state ) {
914+ switch (state )
915+ {
910916 case TAG_RETURN :
911917 EMSG (_ ("E267: unexpected return" ));
912918 break ;
@@ -931,10 +937,12 @@ static void error_print(int state)
931937 eclass = CLASS_OF (ruby_errinfo );
932938 einfo = rb_obj_as_string (ruby_errinfo );
933939#endif
934- if (eclass == rb_eRuntimeError && RSTRING_LEN (einfo ) == 0 ) {
940+ if (eclass == rb_eRuntimeError && RSTRING_LEN (einfo ) == 0 )
941+ {
935942 EMSG (_ ("E272: unhandled exception" ));
936943 }
937- else {
944+ else
945+ {
938946 VALUE epath ;
939947 char * p ;
940948
@@ -1216,7 +1224,8 @@ static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
12161224 /* set curwin/curbuf for "buf" and save some things */
12171225 aucmd_prepbuf (& aco , buf );
12181226
1219- if (u_savesub (n ) == OK ) {
1227+ if (u_savesub (n ) == OK )
1228+ {
12201229 ml_replace (n , (char_u * )line , TRUE);
12211230 changed ();
12221231#ifdef SYNTAX_HL
@@ -1257,7 +1266,8 @@ static VALUE buffer_delete(VALUE self, VALUE num)
12571266 /* set curwin/curbuf for "buf" and save some things */
12581267 aucmd_prepbuf (& aco , buf );
12591268
1260- if (u_savedel (n , 1 ) == OK ) {
1269+ if (u_savedel (n , 1 ) == OK )
1270+ {
12611271 ml_delete (n , 0 );
12621272
12631273 /* Changes to non-active buffers should properly refresh
@@ -1296,7 +1306,8 @@ static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
12961306 /* set curwin/curbuf for "buf" and save some things */
12971307 aucmd_prepbuf (& aco , buf );
12981308
1299- if (u_inssub (n + 1 ) == OK ) {
1309+ if (u_inssub (n + 1 ) == OK )
1310+ {
13001311 ml_append (n , (char_u * ) line , (colnr_T ) 0 , FALSE);
13011312
13021313 /* Changes to non-active buffers should properly refresh screen
@@ -1502,7 +1513,8 @@ static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
15021513 int i ;
15031514 VALUE str = rb_str_new ("" , 0 );
15041515
1505- for (i = 0 ; i < argc ; i ++ ) {
1516+ for (i = 0 ; i < argc ; i ++ )
1517+ {
15061518 if (i > 0 ) rb_str_cat (str , ", " , 2 );
15071519 rb_str_concat (str , rb_inspect (argv [i ]));
15081520 }
0 commit comments