diff options
author | mongo <andmarti@gmail.com> | 2017-06-22 12:04:58 -0300 |
---|---|---|
committer | mongo <andmarti@gmail.com> | 2017-06-22 12:04:58 -0300 |
commit | b3fbd37e928b9aa3f641a49535ed0955aab1292e (patch) | |
tree | 9b7ad94b39f9eeeac85f0714afb0d2f8ef7da9f7 | |
parent | 0b3c46c6baff4f27d986fbc2a91f2f508a6b9e30 (diff) |
Fix when sorting when no range is selected
-rw-r--r-- | src/cmds_command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmds_command.c b/src/cmds_command.c index e9ba8da..aa8cb1e 100644 --- a/src/cmds_command.c +++ b/src/cmds_command.c @@ -431,7 +431,7 @@ void do_commandmode(struct block * sb) { } else if ( ! wcsncmp(inputline, L"sort ", 5) ) { wcscpy(interp_line, inputline); - if (p != -1) { + if (p != -1) { // in case there is a range selected wchar_t cline [BUFFERSIZE]; wcscpy(cline, interp_line); int found = wstr_in_wstr(interp_line, L"\""); @@ -439,9 +439,9 @@ void do_commandmode(struct block * sb) { del_range_wchars(cline, 0, found-1); swprintf(interp_line, BUFFERSIZE, L"sort %s%d:", coltoa(sr->tlcol), sr->tlrow); swprintf(interp_line + wcslen(interp_line), BUFFERSIZE, L"%s%d %ls", coltoa(sr->brcol), sr->brrow, cline); - send_to_interp(interp_line); } } + send_to_interp(interp_line); } else if ( ! wcsncmp(inputline, L"subtotal ", 9) ) { int r = currow, c = curcol, rf = currow, cf = curcol, pos, cancel = 0; |