Skip to content

Commit

Permalink
Vim gd case, fix 672
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhanathan Shanmugam committed Oct 25, 2014
1 parent 2369518 commit 6ae986e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion yi/src/library/Yi/Modes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,16 @@ fundamentalMode = emptyMode
, modeGotoDeclaration = do
currentPoint <- pointB
currentWord <- readCurrentWordB
currentWordBeginningPoint <- regionStart <$> regionOfB unitWord
_ <- gotoLn 0
word <- return $ makeSimpleSearch currentWord
searchResults <- regexB Forward word
case searchResults of
(declarationRegion : _) -> moveTo $ regionStart declarationRegion
(declarationRegion : _) -> do
searchPoint <- return $ regionStart declarationRegion
if(currentWordBeginningPoint /= searchPoint)
then moveTo searchPoint
else moveTo currentPoint
[] -> moveTo currentPoint
}

Expand Down

0 comments on commit 6ae986e

Please sign in to comment.