Comments (5)
Also a question: when I scroll the mouse wheel down (towards me), I expect the text buffer to scroll upward so I can see what is below my current view. Thus, I expect mouseWheelDown and scrollUp to be called. Is this not the case for you? The naming always confuses me LOL and I just want to make sure what's happening.
from ci_edit.
A few more questions:
- When we scroll up/down, do we also want it to move the cursor or should the cursor/all selected text stay the same?
- What is captive cursor?
Sorry I just want to clarify all these things before changing them to make sure the design stays the same. This bug caused an error in my bookmarks so I want to track it down before finishing up and releasing the bookmarks implementation
from ci_edit.
Interesting effect/bug.
Which way is up
What is up vs. down is a long time debate in computer UI's. I've heard there were debates on it in Xerox PARC and Apple back when scrolling UIs were first done. With mouse wheels and touchpads the debate continued. IIUC, at the heart of the debate is whether the user is scrolling the cursor (focus) or whether they are scrolling the document. Now with touchpads, imo, a self evident decision has arrived because it's more intuitive for the screen to follow the user's finger (i.e. scrolling the document) when moving (rather than going the other way). Mac (and maybe others) have an OS option to reverse the scroll direction of a mouse wheel/trackpad. (Any of the above could be wrong, that's my memory of it off the top of my head).
Maybe app.prefs.editor['scrollDirection']
Maybe we should include an option to reverse the scroll direction.
Captive Cursor
Other console editors, such as vi, keep the cursor on the screen when scrolling. So if the window is scrolled away from the cursor, the cursor gets 'caught' by the window border and dragged along so that it stays on-screen* (what I call captive**). GUI editors don't tend to do that, they leave the cursor in-place within the document while the window scrolls.
ci initially acted more like a console editor
So when I started ci_edit, I kept the cursor on the screen and added a marker feature. After some time, I began to ask myself why, why was doing what had been done before and whether that was really the most intuitive design. When I made the cursor behave more like a GUI editor I decided not to remove the code that held the cursor 'captive' on the screen, so I put it behind a preference setting. I suspect (bet on) someone in the future having a desire for the captive cursor behavior, and thought it would be nice to offer it.
*For this reason a 'marker' feature is necessary to specify ranges of text for acting upon (like cut, or copy). Leaving the cursor in-place to mark a position doesn't work if the user wants to act on more than a screen full of text. Since GUI editors that leave the cursor in-place within the document, the cursor itself acts as the 'marker' so a separate marker concept/feature is not needed.
**I don't think 'captive' is an official term, I just needed something to call it and 'captive' filled the need for a name.
from ci_edit.
Also, confusingly (unless ya don't think about it, then it's fine)* a click-and-drag action actually reverses the scrolling behavior. This is because the scrolling paradigm changes from scrolling the document to scrolling the cursor (focus).
*UI scrolling is like walking. It's all fine unless ya think about it too much, then it becomes a complicated mess :).
from ci_edit.
Update: I think the main point of this PR is that scrolling when on the status line makes the textbuffer go in the opposite direction than if you scroll with the mouse on the main text buffer.
Edit:
By default, we have natural scrolling turned OFF, so scrolling up should show earlier lines.
Currently, scrolling up with the mouse on the message line/stats line makes the textbuffer scroll down (as if natural scrolling is turned ON)
Scrolling down with the mouse at this area makes the cursor go to the bottom of the document and all text in between gets highlighted.
from ci_edit.
Related Issues (20)
- Executing full_test when inside tools directory gives error HOT 1
- Confirmation on quit HOT 1
- Delay in updation of status bar
- Fuzzy search inside the current work directory HOT 3
- AttributeError: module 'profile' has no attribute 'run' HOT 12
- Add ctags support HOT 2
- Add language server support HOT 1
- Move unit tests to the appropriate directory HOT 1
- Add a command to split the editor horizontally HOT 2
- Add a package to pypi HOT 1
- Is there a way to highlight the line in case of a syntax error? HOT 1
- 'str' object has no attribute 'decode' , Chinese user HOT 4
- Is there anyone who is working on "user customizable color scheme" ? HOT 7
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte HOT 5
- Undo after File closing HOT 1
- Running ci_edit under Python 2 HOT 1
- py formatter needs prefs
- Cannot open file. Ubuntu 18.04 HOT 3
- How to remove auto-indentation? HOT 3
- Red highlighted words all over the place HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ci_edit.