Giter VIP home page Giter VIP logo

Comments (2)

keforbes avatar keforbes commented on June 10, 2024

This only happens if the last line of the file is empty. That explains why I didn't hit it prior to releasing 0.18.0

java.lang.RuntimeException: org.eclipse.jface.text.BadLocationException
at net.sourceforge.vrapper.eclipse.platform.EclipseTextContent$ModelSideTextContent.getLineInformation(EclipseTextContent.java:49)
at net.sourceforge.vrapper.vim.commands.motions.GoToLineMotion.destination(GoToLineMotion.java:35)
at net.sourceforge.vrapper.vim.commands.motions.CountedMotion.destination(CountedMotion.java:19)
at net.sourceforge.vrapper.vim.commands.MotionCommand.doIt(MotionCommand.java:35)
at net.sourceforge.vrapper.vim.commands.MotionCommand.execute(MotionCommand.java:26)
at net.sourceforge.vrapper.vim.commands.CountAwareCommand.execute(CountAwareCommand.java:16)
at net.sourceforge.vrapper.vim.modes.CommandBasedMode.executeCommand(CommandBasedMode.java:205)
at net.sourceforge.vrapper.vim.modes.NormalMode.enterMode(NormalMode.java:347)
at net.sourceforge.vrapper.vim.DefaultEditorAdaptor.changeMode(DefaultEditorAdaptor.java:187)
at net.sourceforge.vrapper.vim.DefaultEditorAdaptor.changeModeSafely(DefaultEditorAdaptor.java:126)
at net.sourceforge.vrapper.vim.modes.commandline.AbstractCommandParser.type(AbstractCommandParser.java:58)
at net.sourceforge.vrapper.vim.modes.AbstractCommandLineMode.handleKey(AbstractCommandLineMode.java:36)

from vrapper.

keforbes avatar keforbes commented on June 10, 2024

I added a workaround/fix for this issue. If getLineInformation() throws a RuntimeException I step back to the previous line and try again. I figure we'll be no worse off if we get the same Exception again but it will resolve this specific issue if it was that expected Exception. I don't know what else I can do given that getNumberOfLines() is essentially returning an invalid value in this case.

from vrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.