comparison src/misc1.c @ 3058:4a7097153089 v7.3.301

updated for version 7.3.301 Problem: When 'smartindent' and 'copyindent' are set a Tab is used even though 'expandtab' is set. Solution: Do not insert Tabs. Add a test. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 07 Sep 2011 19:58:09 +0200
parents aa40bddeea9a
children 0ecfe54a273f
comparison
equal deleted inserted replaced
3057:d679d9ac3a7e 3058:4a7097153089
361 ++s; 361 ++s;
362 } 362 }
363 363
364 /* Fill to next tabstop with a tab, if possible */ 364 /* Fill to next tabstop with a tab, if possible */
365 tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts); 365 tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
366 if (todo >= tab_pad) 366 if (todo >= tab_pad && !curbuf->b_p_et)
367 { 367 {
368 todo -= tab_pad; 368 todo -= tab_pad;
369 ++ind_len; 369 ++ind_len;
370 if (p != NULL) 370 if (p != NULL)
371 *p++ = TAB; 371 *p++ = TAB;
372 } 372 }
373 373
374 /* Add tabs required for indent */ 374 /* Add tabs required for indent */
375 while (todo >= (int)curbuf->b_p_ts) 375 while (todo >= (int)curbuf->b_p_ts && !curbuf->b_p_et)
376 { 376 {
377 todo -= (int)curbuf->b_p_ts; 377 todo -= (int)curbuf->b_p_ts;
378 ++ind_len; 378 ++ind_len;
379 if (p != NULL) 379 if (p != NULL)
380 *p++ = TAB; 380 *p++ = TAB;