GNOME Bugzilla – Bug 695025
Squaring key adds to exponent instead of squaring
Last modified: 2013-05-19 19:53:48 UTC
1. Basic mode 2. Press 3 3. Press squaring key twice 4. Press = Expected: Result value is 81. Actual: Result value is 31381059609. Source: http://gfredericks.com/gfrlog/posts/81 and https://bugs.launchpad.net/bugs/1107169
Created attachment 242653 [details] [review] Fixed the error :)
Review of attachment 242653 [details] [review]: A better way to deal with this would be to add a blank space before appending ² to the equation if there is already a superscript number just before cursor.
Created attachment 243150 [details] [review] Added superscript notation with space in multiple squaring.
Review of attachment 243150 [details] [review]: Except for code formatting issue, the patch looks great and is ready to be committed. Can you fix the format as following? <function_name><space>(<whatever>); Thank you. :) ::: src/math-equation.vala @@ +800,3 @@ + + /*if it is not the first character in the buffer*/ + if(iter.backward_char()) Incorrect formatting. @@ +802,3 @@ + if(iter.backward_char()) + { + unichar previous_character = iter.get_char(); Incorrect formatting. @@ +809,3 @@ + } + + if(space_required) Incorrect formatting. @@ +811,3 @@ + if(space_required) + { + insert(" ²"); Incorrect formatting. @@ +815,3 @@ + else + { + insert("²"); Incorrect formatting.
Created attachment 244670 [details] [review] Fixed spaces.
Review of attachment 244670 [details] [review]: Committed.. Thank you. :)