Revert "Mappings: Delegate to VimwikiFollowLink for link creation"

This reverts commit 0ac7da0fde.
The commit contained code that was included by mistake.
This commit is contained in:
Tomas Babej 2017-01-27 14:24:59 +01:00
parent 7e70ba9935
commit 0eedf6f3ef
3 changed files with 3 additions and 33 deletions

View file

@ -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):

View file

@ -19,7 +19,7 @@ TEXT = r'(?P<text>.+?)'
COMPLETION_MARK = r'(?P<completed>.)'
PRIORITY = r'(?P<priority>!{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)"

View file

@ -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"