Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code editor: find & replace #7932

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Conversation

blancoberg
Copy link
Contributor

@blancoberg blancoberg commented Dec 21, 2024

  • Find & Replace ( ctrl + h) ( Enter : replace one and command + enter : replace all )
  • Some refactoring of TextfieldPopup
  • Resets UndoManager on lua editor init. ( removed the empty undo state that made it possible to undo to a blank doc)
  • Keyboard shortcuts for popups now works inside the popups as well.

update

  • Fixed a bug where it indents even if the caret is positioned before the keyword

update 2

  • changed popup font/size to same as editor.
  • added find, replace and go to line to context menu

* Find & Replace ( ctrl + h)
	( Enter : replace one and command + enter : replace all )
* Some refactoring of TextfieldPopup
* Resets undoManager on luaeditor init. ( removed the empty undo state that made it possible to undo to a blank doc)
* keyboard shortcuts for popups now works inside the popups as well.
@mkruselj
Copy link
Collaborator

Great stuff! 👍

* Fixes a bug where it indents even if the caret is positioned before the keyword
@baconpaul
Copy link
Collaborator

joel - is this ready to merge?

@@ -45,8 +45,9 @@ namespace Overlays
TextfieldPopup
Base class that can be used for creating other textfield popups like the search
*/
TextfieldButton::TextfieldButton(juce::String &svg) : juce::Component()
TextfieldButton::TextfieldButton(juce::String &svg, int r) : juce::Component()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name this second argument more nicely so that it it's clearer, rather than guesswork.

@mkruselj
Copy link
Collaborator

mkruselj commented Dec 23, 2024

Looks fine to me apart from the one comment I left. Also those inlined SVGs are kinda ugly, I would suggest moving them to resources/classic-skin-svgs (even if they are not going to be exposed to the skin engine necessarily) then adapting the code to load them explicitly. But this can be done in a separat PR.

@blancoberg
Copy link
Contributor Author

joel - is this ready to merge?

I have one more commit where I've added find,replace and goto to the context menu. I'll also fix @mkruselj comment on the function parameter

* changed popup font & size to the same as editor.
* added find, replace and go to line to context menu
@blancoberg
Copy link
Contributor Author

@baconpaul @mkruselj done!

@mkruselj mkruselj merged commit 4cb028d into surge-synthesizer:main Dec 23, 2024
13 checks passed
@blancoberg blancoberg deleted the editor_replace branch January 3, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants