svn commit: r258093 - user/ed/newcons/sys/dev/vt

Aleksandr Rybalko ray at FreeBSD.org
Wed Nov 13 14:35:01 UTC 2013


Author: ray
Date: Wed Nov 13 14:35:00 2013
New Revision: 258093
URL: http://svnweb.freebsd.org/changeset/base/258093

Log:
  Do not add <CR><LF> for last (single) line of paste buffer.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/ed/newcons/sys/dev/vt/vt_buf.c

Modified: user/ed/newcons/sys/dev/vt/vt_buf.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/vt_buf.c	Wed Nov 13 13:41:36 2013	(r258092)
+++ user/ed/newcons/sys/dev/vt/vt_buf.c	Wed Nov 13 14:35:00 2013	(r258093)
@@ -614,8 +614,11 @@ vtbuf_extract_marked(struct vt_buf *vb, 
 		for (c = cs; c < ce; c ++) {
 			buf[i++] = vb->vb_rows[r][c];
 		}
-		buf[i++] = '\r';
-		buf[i++] = '\n';
+		/* Add new line for all rows, but not for last one. */
+		if (r != e.tp_row) {
+			buf[i++] = '\r';
+			buf[i++] = '\n';
+		}
 	}
 }
 


More information about the svn-src-user mailing list