Bug 398780 - Editor font does not change according to schema
Summary: Editor font does not change according to schema
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-18 06:23 UTC by d_tassos
Modified: 2022-06-16 06:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description d_tassos 2018-09-18 06:23:01 UTC
With the latest rkward-git (v0.7.0b.r335.g7801fec6-1) the formating of the fonts in the text editor does not change according to selected schema. When changing schema the background might change, but not the color of the font, text styles and so on.

This on a Manjaro/Arch system.
Comment 1 Thomas Friedrichsmeier 2018-09-18 07:25:18 UTC
Thanks for reporting. Did this work previously, for you, if so with what version? (This info might help us figure out, how we broke it).

Thanks!
Comment 2 flyos 2018-09-18 07:32:50 UTC
I think I have something related, syntax highlighting became messed up (not following the global theme, Dark Breeze, but the default one, though this is in the Console, not in the script editor), I believe since KF5 updated to 5.50 on my system.
Comment 3 d_tassos 2018-09-18 10:51:09 UTC
Yes, this has been working previously. Basically the editor would look like Kate does.

Actually in my not yet updated system (kf 5.49.0-1, rkward v0.7.0b.r299.ga2f7a765-1) it is working, kate and rkward editor look the same.

In the updated system, with latest kf5 and rkward, kate looks as usual using when using schema while the editor in rkward does not change according to teh schema used.

I'll be happy to do some digging to check what might be wrong.

Cheers
Comment 4 d_tassos 2018-09-18 11:06:02 UTC
Also, forgot to mention that I'm installing through the arch user repository (AUR).

I have copy pasted below the make commands included in the pkgbuilt from aur incase there is something funky just how the package is made.


cmake -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
  -DCMAKE_INSTALL_LIBDIR=lib \
      -DR_LIBDIR=/usr/lib/R/library
make
Comment 5 d_tassos 2018-09-24 06:04:07 UTC
I just noticed after reinstalling the latest git version (got updated while updating other packages) that there is actually not an Rscript mode to choose. Didn't even think to check that before.

Also the other day even in kate my open r script files didn't have the R formating applyied, I had to reselect the R script mode and then it worked.

As for rkward I downgraded to the previous I had on my harddrive and that one still works as before.
Comment 6 Thomas Friedrichsmeier 2018-10-04 14:41:50 UTC
Sorry for the delay.

I'm not sure what may be causing this, but given the behavior you describe for kate, I suppose, it's probably some change on that end.

Further, as you write that highlighting returns when you select it manually, I guess the problem is with the stored highlighting mode. (ktexteditor saves that per file, so the mode sticks, even if it is not set as the default mode for a filename extension). So: Could you try, whether the same (selecting the mode, manually) works in RKWard? You'll find that at Edit->Tools Move->Highlighting.

Finally, am I correct in guessing that this affects only files that you have been editing, before? I.e. if you select Create->Script File, or create an all-new .R file, externally, highlighting is correct?

Thanks!
Comment 7 flyos 2018-10-04 14:45:03 UTC
Sorry for linking a Reddit thread, but I think it might be related to this:
https://www.reddit.com/r/kde/comments/9l42ki/the_kate_syntax_highlighting_color_scheme_changed/

In which case, I think the problem lies within KTextEditor indeed.
Comment 8 Thomas Friedrichsmeier 2018-10-05 07:46:00 UTC
Yes, or more likely this (linked from that Reddit thread): https://kate-editor.org/2018/07/31/porting-ktexteditor-to-ksyntaxhighlighting/ .

Could you please try one more thing in RKWard (after the update), though? Does a fresh R script created via Create->Script File get correct highlighting? Does an R script opened via File->Open *for the very first time* (including not in any previous session) get correct highlighting?

Lack of highlighting in these two cases would be issues that we would need to address inside RKWard.
Comment 9 d_tassos 2018-10-07 11:38:15 UTC
So i kinda of "fixed" it.

I could not choose the R script style of highlighting after creating a new script after the update.

Then I remembered I had saved an error message I had when I updated my other system found bellow:

"error: failed to commit transaction (conflicting files)
syntax-highlighting: /usr/share/org.kde.syntax-highlighting/syntax/r.xml exists in filesystem (owned by rkward-frameworks-git)"

So after the update I checked the /usr/share/org.kde.syntax-highlighting/syntax/r.xml but that file did not exists.

I then reinstalled an older version of rkward i had in my pacman cache and then the above file was back.

I copied it (the r.xml file) over to my home folder and updated rkward once again. The file was then once again gone from /usr/share/org.kde.syntax-highlighting/syntax/ so I copied it back from my home folder and now it is working again.

Why the updated rkward keeps deleting this file I don't know, or is it part of the rkward package?

Cheers
Comment 10 Thomas Friedrichsmeier 2022-06-16 06:55:52 UTC
I believe this is long since fixed. If you see something like this again, please open a new ticket.