Hello,
While trying operator overloading in Rust, I see some unexepected behaviour of Geany. For a structure called ComplexNumber, the implementation of Add and Mul require separate implementation blocks. I expected that Add and Mul would be listed together with print and magnitude. If I try operator overloading in a similar way in C++, the member functions get nicely grouped below the name of the structure, even if they are defined in separate blocks. See the picture and the attached Rust example.
![implementationsrust](https://cloud.githubusercontent.com/assets/7198614/10871318/e51a5f5a-80e3-11e5-987f-4e2fc4c16615.png)
use std::ops::{Add,Mul};
#[derive(Debug,Copy,Clone)]
pub struct ComplexNumber {
r : f64,
j : f64
}
impl Add for ComplexNumber{
type Output = ComplexNumber;
fn add(self, rhs: ComplexNumber) -> ComplexNumber {
ComplexNumber {r: self.r+rhs.r, j: self.j+rhs.j}
}
}
impl Mul for ComplexNumber{
type Output = ComplexNumber;
fn mul(self, rhs: ComplexNumber) -> ComplexNumber {
ComplexNumber {r: self.r*rhs.r-self.j*rhs.j, j: self.r*rhs.j+self.j*rhs.r}
}
}
impl ComplexNumber {
fn print(& self) {
print!("{}+{}i ",self.r,self.j);
}
fn magnitude(& self) -> f64 {
(self.r.powi(2)+self.j.powi(2)).sqrt()
}
}
fn main()
{
let a = ComplexNumber {r: 1.0, j: 0.0};
let b = ComplexNumber {r: 0.0, j: 1.0};
let c = a + b;
let d = a * b;
let e = c + d;
c.print();
d.print();
e.print();
print!("{} ", e.magnitude());
}
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/728
This is a sister implementation for "k" in order to behave like "j" when wrapping is on (see #748). The problem with the current implementation is that "k" moves caret to the last line of a wrapped line instead of the first one like "j".
@pcworld Can you check if it looks good to you? This one is a bit more complex because one has to either "iterate" over the wraps when going up (for the first line only) or go to the previous line and go down.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/754
-- Commit Summary --
* vimode: When wrapping is on, "k" should go to the first line of wrapping
-- File Changes --
M vimode/src/cmds/motion.c (48)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/754.patchhttps://github.com/geany/geany-plugins/pull/754.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/754
SCI_LINEDOWN goes down only one display line, hence when line wrapping
was enabled and a line wrapped over more than two lines, it was
impossible to go to the next actual line when pressing j.
Note that this still doesn't emulate vim behavior correctly where
caret-x position is saved for actual lines and not display lines. But
this change at least makes j go the next line when wrapping is enabled.
Note that I'm not completely sure whether this change retains all workarounds [mentioned in `cmd_goto_up`](https://github.com/geany/geany-plugins/blob/341cab4e13c122b2b74e6f31a43be9adc653f8af/vimode/src/cmds/motion.c#L51-L54).
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/748
-- Commit Summary --
* vimode: Fix goto_down with line wrapping
-- File Changes --
M vimode/src/cmds/motion.c (2)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/748.patchhttps://github.com/geany/geany-plugins/pull/748.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/748
After upgrading from gtk2 to gtk3, the height of the status bar increased (uselessly wasting space), but the text size decreased. On my high-res screen, text is now way too small to be readable (about half the size of the menu bar text size).
Please:
- Increase status bar text size at least to menu bar text size.
- Decrease status bar height (also to menu bar height).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1911
Unable to perform version check.
Error code: 6
Error message: »Unacceptable TLS certificate«
Here's the debug:
19:57:29: Updatechecker MESSAGE : Checking for updates (querying URL "http://geany.org/service/version.php")
19:57:30: Updatechecker WARNING : Connection error: Code: 6; Message: Unacceptable TLS certificate
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1909
Is there a way to change the language (not programming language) on Geany through the settings?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1910
I installed the latest geany on my windows 7 machine a couple days ago. When I type anywhere on the program that text can be typed, it appears in one the the Japanese alphabets (katakana). The encoding in the program is set to UTF-8. No matter what I change the encoding to, it is still typing in katakana.
My windows 7 is set to English US. I have no idea how to get it to type in english using roman character.
I do have a Japanese keyboard set so I can type in Japanese when need be, but it has never been an issue.
99% of the time I'm not typing in Japanese anyways.
When you type in japanese, it is phoenetic. To make a syllable you need to type "t" + "a" to get "ta"->た. and that is hiragana.
When I try typing in geany, i get katakana characters showing up even if I press one key. My Japanese keyboard is not set to do that anyways.
Any ideas how I could fix this?
Thank you.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1785
The project_ask_close dialog box ("Do you want to close it before proceeding?") slows down switching between different projects, so I'd like a way to disable it.
I've made the following change in my local copy: add "skip_project_ask_close" to the various options tab, and check it in project_ask_close(). Default false to preserve the current behaviour.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1907
I'm using Lubuntu 18.04, geany 1.32.
When saving a new file, this window appears (the screenshot is cropped):
![2018-07-26-230714_887x496_scrot](https://user-images.githubusercontent.com/3192173/43288779-386ae8f2-9129-11e8-9ad6-d38877ca5bc5.png)
If I click on save now, the file is saved in this folder.
However, if I click on the white background (or somewhere similar), the first folder is automatically selected. (Nothing happens if there are only files but no folder) I can not unselect the folder, I can only select a file instead, but then my target filename is changed to this file's name.
![2018-07-26-230716_887x496_scrot](https://user-images.githubusercontent.com/3192173/43288782-3b7072f6-9129-11e8-8acf-b2a56a4e410e.png)
If I click on Save and the folder is selected, instead of saving the file in the current folder, the selected folder is opened:
![2018-07-26-230720_887x496_scrot](https://user-images.githubusercontent.com/3192173/43288790-3ec378ae-9129-11e8-9b11-de538f6eb849.png)
So if I want to save a file in a folder which contains a folder, I somehow need to take care to not accidentally click there.
I have this problem not only with geany but also with other programs, e.g. firefox.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1906