ruben2020 / codequery

A code-understanding, code-browsing or code-search tool. This is a tool to index, then query or search C, C++, Java, Python, Ruby, Go and Javascript source code. It builds upon the databases of cscope and ctags, and provides a nice GUI tool.
https://ruben2020.github.io/codequery/
Mozilla Public License 2.0
680 stars 86 forks source link

On macbook, window width is too wide and cannot be resized #96

Closed girishji closed 1 year ago

girishji commented 1 year ago

It automatically keeps widening window so that a chunk of window is not visible in the viewport. The box that shows path to file is not readable since it is cut off. If I resize the window to fit the screen, a few moments later (after a few searches) the window is too wide again. Also, please rearrange the boxes so that path to file is on the left half of screen, and buttons can be in 2 rows. Using v0.25.0

ruben2020 commented 1 year ago

@girishji Is it possible for you to provide a screenshot? Thanks.

girishji commented 1 year ago

It happens when the file whose contents appear in the right hand bottom window has a long path that exceeds the box width where path is seen.

Screen Shot 2022-12-14 at 9 18 41 AM
girishji commented 1 year ago

See how window automatically resized to spill past the viewport on the right side, when I selected keymap.c file in the top window. This is to accommodate long path inside that box in the middle right (/Users/gp/...). Also, you can move some of those brown buttons to their own row, so path can have a row by itself. I don't finsd those buttons useful. You can make them smaller.

girishji commented 1 year ago

Also, opening file using external editor does not work on Mac. Maybe there is a way to use applescript to launch gvim (for instance), a la 'gedit %f ...' for linux.

ruben2020 commented 1 year ago

Hi @girishji

OK. I've understood the point about the filename being too long, causing graphical distortions.

ruben2020 commented 1 year ago

@girishji As for the external editor, I could edit the configuration this way in Windows and Linux (see below).

How come there's no top menu bar in MacOS?

Please see images below:

image image

ruben2020 commented 1 year ago

@girishji For the external editor configuration, perhaps you can give me a default string that will always work in MacOS, and I can use that, similar to notepad.exe on Windows.

I found this for XCode:

xed --line %n %f

girishji commented 1 year ago

Ruben,

ruben2020 commented 1 year ago

@girishji Thanks! I have fixed the GUI bug and also used "open -t %f" (as default on Mac, if a config file was not yet created or not found) and it's currently committed to the develop branch, but it's not yet officially released. If you can build it yourself, then you can try it out. Otherwise, you need to wait for me to release it officially. It may take a few days to appear on Brew.

girishji commented 1 year ago

Thank you!

ruben2020 commented 1 year ago

@girishji Fixed in version 0.26.0. It should appear in Brew within two days.