pkgsrc/editors/nvi/patches/patch-ay
wiz 264c1fb0e3 Fix build with automake-1.13.
While here, use a better WRKSRC and rebase patches.
2013-01-23 17:26:07 +00:00

19 lines
542 B
Text

$NetBSD: patch-ay,v 1.2 2013/01/23 17:26:08 wiz Exp $
--- ex/ex_txt.c.orig 2007-11-19 03:41:42.000000000 +1100
+++ ex/ex_txt.c
@@ -403,8 +403,12 @@ txt_dent(SCR *sp, TEXT *tp)
*
* Count up spaces/tabs needed to get to the target.
*/
- for (cno = 0, tabs = 0; cno + COL_OFF(cno, ts) <= scno; ++tabs)
- cno += COL_OFF(cno, ts);
+ cno = 0;
+ tabs = 0;
+ if (!O_ISSET(sp, O_EXPANDTAB)) {
+ for (; cno + COL_OFF(cno, ts) <= scno; ++tabs)
+ cno += COL_OFF(cno, ts);
+ }
spaces = scno - cno;
/* Make sure there's enough room. */