diff --git a/taskwiki/main.py b/taskwiki/main.py index bfd5609..bfc3fa5 100644 --- a/taskwiki/main.py +++ b/taskwiki/main.py @@ -266,7 +266,7 @@ class Mappings(object): vim.command('VimwikiFollowLink') return - # No link detected, check for viewport or a task + # No link detected, so it's our stuff now if cache.vwtask[row] is not None: SelectedTasks().info() else: @@ -274,11 +274,6 @@ class Mappings(object): if port is not None: Meta().inspect_viewport() - # No link detected, not a viewport or a task, so delegate to - # VimwikiFollowLink for link creation - vim.command('VimwikiFollowLink') - - class Meta(object): diff --git a/taskwiki/regexp.py b/taskwiki/regexp.py index bd5a5df..04e360a 100644 --- a/taskwiki/regexp.py +++ b/taskwiki/regexp.py @@ -19,7 +19,7 @@ TEXT = r'(?P.+?)' COMPLETION_MARK = r'(?P.)' PRIORITY = r'(?P!{1,3})' -GENERIC_TASK = re.compile(u''.join([ +GENERIC_TASK = re.compile(''.join([ '^', EMPTY_SPACE, BRACKET_OPENING, @@ -36,7 +36,7 @@ GENERIC_TASK = re.compile(u''.join([ ')?', # UUID is not there for new tasks SPACE_UNNAMED, '$' # Enforce match on the whole line -]), re.UNICODE) +])) DATETIME_FORMAT = "(%Y-%m-%d %H:%M)" DATE_FORMAT = "(%Y-%m-%d)" diff --git a/tests/test_viewport.py b/tests/test_viewport.py index 9f83f59..74bfa06 100644 --- a/tests/test_viewport.py +++ b/tests/test_viewport.py @@ -599,28 +599,3 @@ class TestViewportsPreserveHierarchyUponCompletion(IntegrationTest): sleep(0.5) self.command("w", regex="written$", lines=1) sleep(0.5) - - -class TestViewportRecurrentInstanceTaskGeneration(IntegrationTest): - - viminput = """ - === Work tasks | +TODAY === - """ - - vimoutput = """ - === Work tasks | +TODAY === - * [ ] daily task #{uuid} - """ - - tasks = [ - dict(description="daily task", recur="daily", due="today"), - ] - - def execute(self): - self.command("w", regex="written$", lines=1) - - # Assert that the task did not change after another successful - # subsequent saving. See pull request #125. - self.command("w", regex="written$", lines=1) - task = self.tw.tasks.pending()[0] - assert task['description'] == "daily task"