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

General Math buttons copy expressions with semicolons (reopened) #244

Open
dilijev opened this issue Jan 9, 2013 · 2 comments
Open

General Math buttons copy expressions with semicolons (reopened) #244

dilijev opened this issue Jan 9, 2013 · 2 comments
Labels

Comments

@dilijev
Copy link
Collaborator

dilijev commented Jan 9, 2013

When the cursor is in a cell (no selection) and "Simplify" is selected from General Math, the expression is copied with its semicolon. Since the semicolon is syntactically incorrect in the current context, the simplification fails, and the expression must be corrected manually.

I suggest stripping out the semicolon before copying the cell's text. If a cell contains multiple statements, call the math function once for each input, separating the inputs by the semicolons.

@dilijev
Copy link
Collaborator Author

dilijev commented Jan 9, 2013

Reported in #243 by benibela.

I have verified existence of bug on Windows in wxMaxima 12.01.

@dilijev
Copy link
Collaborator Author

dilijev commented Jul 19, 2013

I have verified that, at least on the Unicode version of wxMaxima, #244 doesn't seem to be working.

The issue seems to be related to the ordering of statements in wxMaxima::GetDefaultEntry.

In particular, it appears that the expression "m_console->CanCopy(true)" is true in all the cases I would have expected "m_console->GetActiveCell() != NULL" to be true, and that branch is being executed while ignoring ExtractFirstExpression.

What was the intent behind that code block -- why are these conditionals considered different cases? I don't believe I added the check for CanCopy, but has the definition of that function changed recently?

@dilijev dilijev reopened this Jul 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants