From e071156b8d9a7ec1e8ec7e86b9b878614e068058 Mon Sep 17 00:00:00 2001 From: Leandro Freitas Date: Fri, 17 Apr 2015 08:38:08 -0300 Subject: [PATCH] Fixes #16 --- autoload/todo/txt.vim | 2 +- test/tc_sort_date.todo.txt | 4 ++-- test/tc_sort_date.vim | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/todo/txt.vim b/autoload/todo/txt.vim index b2b3a57..78769e2 100644 --- a/autoload/todo/txt.vim +++ b/autoload/todo/txt.vim @@ -79,7 +79,7 @@ function! todo#txt#sort_by_project() range endfunction function! todo#txt#sort_by_date() range - execute a:firstline . "," . a:lastline . "sort! /\\d\\{2,4\\}-\\d\\{2\\}-\\d\\{2\\}/ r" + execute a:firstline . "," . a:lastline . "sort /\\d\\{2,4\\}-\\d\\{2\\}-\\d\\{2\\}/ r" endfunction " Increment and Decrement The Priority diff --git a/test/tc_sort_date.todo.txt b/test/tc_sort_date.todo.txt index a8b16ed..82220bd 100644 --- a/test/tc_sort_date.todo.txt +++ b/test/tc_sort_date.todo.txt @@ -1,5 +1,5 @@ # lorem_ipsum (B) 2013-03-15 2015-03-17 -(A) 2012-04-16 2015-04-16 -(B) 2013-03-16 2013-03-10 +(B) 2012-04-16 2015-04-16 +(A) 2013-03-16 2013-03-10 # end_lorem_ipsum diff --git a/test/tc_sort_date.vim b/test/tc_sort_date.vim index d1617f8..817818b 100644 --- a/test/tc_sort_date.vim +++ b/test/tc_sort_date.vim @@ -5,9 +5,9 @@ let s:tc = unittest#testcase#new('Sort Date', let s:LEADER = mapleader let s:SORTED_TASKS = [ - \ '(B) 2013-03-16 2013-03-10', + \ '(B) 2012-04-16 2015-04-16', \ '(B) 2013-03-15 2015-03-17', - \ '(A) 2012-04-16 2015-04-16', + \ '(A) 2013-03-16 2013-03-10', \ ] function! s:tc.test_sort_by_context()