Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

Display horizontal scrollbar in text editor

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

How can I get a horizontal scrollbar to appear for the text editor\*?
It is a bit limiting to have to find the longest line, in order to be able to scroll across the full length...

![horizontal_scroll](https://user-images.githubusercontent.com/4354703/70197350-d15c9f80-16c8-11ea-98c9-6d69a3ba7c6c.gif)

---

\*I am not sure if text editor is the correct name... Looking at the 'overview.c' code, the "text editor" seems to be generated by `nk_edit_string` in the [following lines](https://github.com/Immediate-Mode-UI/Nuklear/blob/a3f40348d572fad24af1e2d6c6b755171af481db/demo/overview.c#L587):

nk_layout_row_static( ctx, 180, 278, 1 );

nk_edit_string(

ctx,
NK_EDIT_BOX,
box_buffer,
&box_len,
512,
nk_filter_default
);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the nk_edit_string call in overview.c around line 587 and inspect how the text editor is configured there. Confirm that long lines can be scrolled horizontally within the editor, and verify the result using the overview demo shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.