Skip to content

Commit

Permalink
#2358: fixed horizontal scroll in the code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed Nov 25, 2023
1 parent e7b1624 commit 4441c9c
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/assets/config.tic.dat

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ THEME=
CHECK_NEW_VERSION=true
SOFTWARE_RENDERING=false
UI_SCALE=4
REVERT_SCROLL=false

---------------------------
function TIC()
Expand Down
1 change: 0 additions & 1 deletion src/studio/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ static void readConfig(Config* config)
readGlobalBool(lua, "CHECK_NEW_VERSION", &config->data.checkNewVersion);
readGlobalInteger(lua, "UI_SCALE", &config->data.uiScale);
readGlobalBool(lua, "SOFTWARE_RENDERING", &config->data.soft);
readGlobalBool(lua, "REVERT_SCROLL", &config->data.revertScroll);

if(config->data.uiScale <= 0)
config->data.uiScale = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/studio/editors/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -3122,7 +3122,7 @@ static void textEditTick(Code* code)
tic_point scroll = {input->mouse.scrollx, input->mouse.scrolly};

if(tic_api_key(tic, tic_key_shift))
scroll.x = scroll.y;
scroll.x = -scroll.y;

s32* val = scroll.x ? &code->scroll.x : scroll.y ? &code->scroll.y : NULL;

Expand Down
3 changes: 0 additions & 3 deletions src/studio/studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,9 +2139,6 @@ static void processMouseStates(Studio* studio)

state->dbl.ticks++;
}

if(getConfig(studio)->revertScroll)
tic->ram->input.mouse.scrolly *= -1;
}

static void blitCursor(Studio* studio)
Expand Down
1 change: 0 additions & 1 deletion src/studio/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ typedef struct
bool checkNewVersion;
bool cli;
bool soft;
bool revertScroll;

struct StudioOptions
{
Expand Down

0 comments on commit 4441c9c

Please sign in to comment.