Giter Club home page Giter Club logo

Comments (2)

dshil avatar dshil commented on September 25, 2024

ping @eugulixes,

Moreover, it has a bug: cub1 moves the cursor one line up when the cursor is not at the left-most position.

Could you please specify this moment. I think that the existing implementation doesn't have this bag.

self._cur_x = max(0, self._cur_x - 1) 
if self._cur_x == self._left_most: # we scroll up only when the cursor reaches the left most position

from gits.

eugulixes avatar eugulixes commented on September 25, 2024

@dshil, this is the way how _cap_cub1 looked like

     def _cap_cub1(self):
         """Moves the cursor left by 1 position.
 
         Usually the method acts as a handler for a Backspace key-press.
         """
         self._cur_x = max(0, self._cur_x - 1)
 
         if self._cur_x == self._left_most:
             self._cur_x = self._right_most
             self._cur_y = max(0, self._cur_y - 1)
             self._eol = True

For example, _cur_x is 1 before calling _cap_cub1. Then, after calling _cap_cub1

  • _cur_x is set to 0
  • self._cur_x == self._left_most is True
  • _cur_x is set to _right_most (79 by default)

from gits.

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.