summaryrefslogtreecommitdiffstats
path: root/src/yank.c
diff options
context:
space:
mode:
authorandmarti1424 <andmarti@gmail.com>2017-02-01 23:52:07 -0300
committerandmarti1424 <andmarti@gmail.com>2017-02-01 23:52:07 -0300
commit88d4faff8a535cd4c0ea01c7814ca13b9a589792 (patch)
tree628c4ec13a8432ced2fa36d3debe4159a04de6c3 /src/yank.c
parented25ca3b6fd646f90fe5c6503bbe798a9a84ad7a (diff)
Fix SEGFAULT when ordering a range with empty files
Diffstat (limited to 'src/yank.c')
-rw-r--r--src/yank.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/yank.c b/src/yank.c
index ba368f9..bfc8620 100644
--- a/src/yank.c
+++ b/src/yank.c
@@ -123,9 +123,7 @@ void yank_area(int tlrow, int tlcol, int brrow, int brcol, char type, int arg) {
for (r = tlrow; r <= brrow; r++)
for (c = tlcol; c <= brcol; c++) {
- //struct ent * elm = *ATBL(tbl, r, c);
- struct ent * elm = type == 's' ? lookat(r, c) : *ATBL(tbl, r, c);
- //if (elm == NULL && type == 's') elm = lookat(r, c);
+ struct ent * elm = *ATBL(tbl, r, c);
// Important: each 'ent' element keeps the corresponding row and col
if (elm != NULL) add_ent_to_yanklist(elm);