Add horizontal scroll bar to Text Editor #57711

Open
opened 2018-11-08 17:21:09 +01:00 by William Reynish · 12 comments

Currently, there is no horizontal ruler in the text editor, even though the text continues outside the visible area:

image.png

We should add a horizontal scrollbar when text exceeds the width of the editor.

Currently, there is no horizontal ruler in the text editor, even though the text continues outside the visible area: ![image.png](https://archive.blender.org/developer/F5444378/image.png) We should add a horizontal scrollbar when text exceeds the width of the editor.
Added subscribers: @WilliamReynish, @ideasman42, @RamiroCantu, @Regnas

#63657 was marked as duplicate of this issue

#63657 was marked as duplicate of this issue

Added subscriber: @Hamitos

Added subscriber: @Hamitos

Hey, I started on this one last weekend and I have a working version of the drawing functions - The scrollbar is correctly drawn according to line length and window size and so on.
I'll get the code to a presentable state and add mouse functionality over the next few weekends.
Just a question though:
What should the highlight be when the selection spans more than one line?
For example if "according to line length" to "I'll get the code" was selected, should there be two red line at the bottom? Should there be a red line at all?

Thanks,

Hey, I started on this one last weekend and I have a working version of the drawing functions - The scrollbar is correctly drawn according to line length and window size and so on. I'll get the code to a presentable state and add mouse functionality over the next few weekends. Just a question though: What should the highlight be when the selection spans more than one line? For example if "according to line length" to "I'll get the code" was selected, should there be two red line at the bottom? Should there be a red line at all? Thanks,

@Hamitos Great. I think line highlighting doesn't make sense for the horizontal scrollbar - only the existing vertical one.

@Hamitos Great. I think line highlighting doesn't make sense for the horizontal scrollbar - only the existing vertical one.
Amit Sari self-assigned this 2018-12-08 16:28:33 +01:00

Hey, I have a diff ready here .
What happens now?

Hey, I have a diff ready [here ](https://developer.blender.org/differential/diff/12825/). What happens now?

Added subscriber: @IanFinn

Added subscriber: @IanFinn
Member

Added subscriber: @Calra

Added subscriber: @Calra
Member

Hi I am a beginner and I would like to contribute towards this task. Is @Hamitos still working on it?
From what I understand is - the original problem was the overflowing of the text and no horizontal bar to access it. Wouldn't it be solved by adding "Word Wrap" feature in the Text editor and it gets adjusted to the width of the text editor?

Thanks

Hi I am a beginner and I would like to contribute towards this task. Is @Hamitos still working on it? From what I understand is - the original problem was the overflowing of the text and no horizontal bar to access it. Wouldn't it be solved by adding "Word Wrap" feature in the Text editor and it gets adjusted to the width of the text editor? Thanks
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

@Calra ...still working on it?

Yes, and you can see that code and examine what it does, and what is further required by following the link just above your comment shown as [D4054: Add horizontal scrollbar to the Text Editor. ](https://developer.blender.org/D4054)

Wouldn't it be solved by adding "Word Wrap"

We do have wordwrap as an option when text editing, and when that is on there is no need for a horizontal scrollbar. But there are many uses of the text editor where you would not want to turn wordwrapping on.

This task might be a nice one to explore by looking at the code referenced in the link and examine those same files on your computer. And if it all makes sense try to implement the changes that are requested in order for the patch to be complete even if it is ultimately done by someone else. Still a good learning exercise. But it might not be an easy one for a beginner, so don't be discouraged if you find it difficult, especially with the need to deal with multi-byte characters. There are lots of other easy things to learn with.

Cheers, Harley

> @Calra ...still working on it? Yes, and you can see that code and examine what it does, and what is further required by following the link just above your comment shown as **[[D4054](https://archive.blender.org/developer/D4054): Add horizontal scrollbar to the Text Editor. ](https://developer.blender.org/D4054)** > Wouldn't it be solved by adding "Word Wrap" We do have wordwrap as an option when text editing, and when that is on there is no need for a horizontal scrollbar. But there are many uses of the text editor where you would not want to turn wordwrapping on. This task might be a nice one to explore by looking at the code referenced in the link and examine those same files on your computer. And if it all makes sense try to implement the changes that are requested in order for the patch to be complete even if it is ultimately done by someone else. Still a good learning exercise. But it might not be an easy one for a beginner, so don't be discouraged if you find it difficult, especially with the need to deal with multi-byte characters. There are lots of other easy things to learn with. Cheers, Harley

Added subscriber: @LahfaSamy

Added subscriber: @LahfaSamy
Amit Sari removed their assignment 2020-06-19 11:57:46 +02:00
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:26:08 +01:00
Campbell Barton added the
Interest
Text Editor
label 2023-03-10 01:44:39 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#57711
No description provided.