فهرست منبع

do not add newline to selection text if next line not selected (Nick)

pancake@nopcode.org 14 سال پیش
والد
کامیت
a047431d34
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      st.c

+ 2 - 2
st.c

@@ -420,8 +420,8 @@ selcopy(void) {
 					memcpy(ptr, term.line[y][x].c, sl);
 					ptr += sl;
 				}
-			if(ls)
-				*ptr = '\n', ptr++;
+			if(ls && y < sel.e.y)
+				*ptr++ = '\n';
 		}
 		*ptr = 0;
 	}