diff options
author | andmarti1424 <andmarti@gmail.com> | 2017-02-01 23:52:07 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2017-02-01 23:52:07 -0300 |
commit | 88d4faff8a535cd4c0ea01c7814ca13b9a589792 (patch) | |
tree | 628c4ec13a8432ced2fa36d3debe4159a04de6c3 /src/yank.c | |
parent | ed25ca3b6fd646f90fe5c6503bbe798a9a84ad7a (diff) |
Fix SEGFAULT when ordering a range with empty files
Diffstat (limited to 'src/yank.c')
-rw-r--r-- | src/yank.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |