Git Product home page Git Product logo

xi-gtk's Introduction

xi-gtk

a GTK+ front-end for the Xi editor

screenshot

Instructions

We recommend to use flatpak-builder for building xi-gtk. To get started, make sure you have flatpak-builder installed and the flathub repo configured correctly.

# add the flathub repo
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Once you are ready, you can build and install xi-gtk with a single command.

flatpak-builder --from-git=https://github.com/eyelash/xi-gtk.git --install-deps-from=flathub --install ~/.xi-gtk-build flatpak.json

Finally, you can run xi-gtk.

flatpak run com.github.eyelash.xi-gtk

Roadmap

  • mouse input and selections
  • saving
  • follow the cursor (respect the scrollto parameter)
  • undo / redo
  • copy / paste
  • line numbers
  • find / replace
  • command palette
  • i18n
  • preferences (font family, font size, etc.)

xi-gtk's People

Contributors

c-bouthoorn avatar eyelash avatar gitter-badger avatar jessefarebro avatar jmi2k avatar martin-v avatar mrandri19 avatar raphlinus avatar sp3d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xi-gtk's Issues

Rewrite in Rust

Would you support the idea of having someone like myself rewrite this in Rust? Would be able to quickly get a lot of the features you want integrated in very little time.

Searching large files is slow.

I opened a 1gb postgres dump and ran a search for "2035428" which is contained a few times in the file and xi-gtk took roughly 2 seconds (Not sure how to time this).

I ran the same search using time grep 2035428 data.pgbk and got the time

real	0m0.660s
user	0m0.528s
sys	0m0.131s

I'd be happy to retest with some better measurements for xi-gtk if anyone would like to help me with a better way to record it.

nothing drawn when opening multiple files

When you open two files at once (by specifying them on the command line) one EditView does not show the file's contents until you resize or scroll. I tried to debug it and it looks like the second render_lines message sent to the core doesn't receive an answer so it might also be a core issue.

GtkSourceView key-binding signal compatibility

Keyboard interaction with GTK widgets should be done through the key binding infrastructure:

https://developer.gnome.org/gtk3/unstable/gtk3-Bindings.html

For text-editing widgets, you want to essentially mirror the signals presented by GtkTextView:

https://developer.gnome.org/gtk3/stable/GtkTextView.html#GtkTextView.signal-details

For touch and mouse events you basically have to read the source code of GtkTextView in order to implement the same state machines they have for selection-expanding scrolling, drag-and-drop, and middle-click paste events. This is ugly, but I'm not aware of an upstream GTK bug about it, or any design plans they have for making it cleaner.

build xi-gtk - "Invalid version of dependency gtk+" ['>= 3.20.0'] found '3.18.9'

after meson ..

take

Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency gtk+-3.0 found: NO found '3.18.9' but need: '>= 3.20.0'

Meson encountered an error in file meson.build, line 20, column 0:
Invalid version of dependency, need 'gtk+-3.0' ['>= 3.20.0'] found '3.18.9'.

this version is critical for your application?

Unknown option --from-git= ...

this http://tonsky.me/blog/disenchantment/ (scroll to bottom) made me curious, but:

error message:

Option parsing failed: Unknown option --from-git=https://github.com/eyelash/xi-gtk.git

reproduce:

Debian https://flatpak.org/setup/Debian/
had to manually change it to sudo apt install flatpak flatpak-builder

flatpak --version; flatpak-builder --version
Flatpak 0.8.9
Flatpak 0.8.9

flatpak-builder --from-git=https://github.com/eyelash/xi-gtk.git --install-deps-from=flathub --install ~/.xi-gtk-build flatpak.json

looks like the Debian included flatpak version is too old for your command? How to upgrade? Thanks.

Error building under Arch Linux

I'm currently getting Unknown option -lm when trying to build under Arch Linux. Full output below:

mick@mick-pc ~/D/xi-gtk (master)> mkdir build
mick@mick-pc ~/D/xi-gtk (master)> cd build/
mick@mick-pc ~/D/x/build (master)> meson ..
The Meson build system
Version: 0.41.0
Source dir: /home/mick/Development/xi-gtk
Build dir: /home/mick/Development/xi-gtk/build
Build type: native build
Project name: xi-gtk
Native c compiler: cc (gcc 7.1.1)
Native vala compiler: valac (valac 0.36.3)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Native dependency gtk+-3.0 found: YES 3.22.15
Native dependency json-glib-1.0 found: YES 1.2.8
Native dependency gio-unix-2.0 found: YES 2.52.2
Library m found: YES
Native dependency glib-2.0 found: YES 2.52.2
Build targets in project: 3
mick@mick-pc ~/D/x/build (master)> ninja
[1/16] Compiling Vala source ../src/Application.vala ../src/Blinker.vala ../src/CoreConnectio...otebook.vala ../src/Style.vala ../src/StyleMap.vala ../src/Utilities.vala ../src/Window.vala.
FAILED: xi-gtk@exe/Application.c xi-gtk@exe/Blinker.c xi-gtk@exe/CoreConnection.c xi-gtk@exe/EditView.c xi-gtk@exe/Line.c xi-gtk@exe/LineCache.c xi-gtk@exe/Notebook.c xi-gtk@exe/Style.c xi-gtk@exe/StyleMap.c xi-gtk@exe/Utilities.c xi-gtk@exe/Window.c 
valac -C --debug -lm --pkg gio-unix-2.0 --pkg json-glib-1.0 --pkg gtk+-3.0 -d xi-gtk@exe --gresources=../resources/gresource.xml ../src/Application.vala ../src/Blinker.vala ../src/CoreConnection.vala ../src/EditView.vala ../src/Line.vala ../src/LineCache.vala ../src/Notebook.vala ../src/Style.vala ../src/StyleMap.vala ../src/Utilities.vala ../src/Window.vala
Unknown option -lm
Run 'valac --help' to see a full list of available command line options.
[3/16] Generating resources_c with a custom command.
ninja: build stopped: subcommand failed.
mick@mick-pc ~/D/x/build (master) [1]> valac --version
Vala 0.36.3
mick@mick-pc ~/D/x/build (master)> uname -r
4.11.3-1-ARCH
mick@mick-pc ~/D/x/build (master)> lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

Have had a bit of a search around valac and -lm but I can't actually see the flag documented as one or as separate character flags.

focus issues

desired result: always focus the EditView and never the tabs themselves

xi-gtk shows bizzare behavior in files with nearly or more than 2147483647 lines

To reproduce:

  1. Create a file with 2147483645 newlines, with yes '' | head -2147483645 > newlines.txt
  2. Open the file in xi-gtk
    A few things are broken already, when you scroll to the end with Ctrl+End, everything stops displaying, but if you do it with the scrollbar, everything seems fine.. somewhat.
  3. Place the cursor at some line at around a couple billion lines
  4. Press enter.
    Note that the line numbers behave weirdly, right now a line was created with the same line number as the next one (the consequent line numbers were not incremented).
    The same thing happens if you delete lines, the line numbers stay out of sync.
    The scroll bar isn't broken yet.
  5. Press enter once more, making the file exactly INT_MAX lines long.
    The scroll bar disappears, and the view is moved to the beginning of the file. Scrolling with the mouse wheel is broken.
  6. Press enter once more, the file is now INT_MAX+1 lines.
    The line numbers disappear.
    If you click inside the xi-gtk window, some line numbers reappear, but the behavior is extremely broken.

Publish flatpak app

Why do I have to build it manualy via flatpack? Could you publish it as binary?

BTW it's downloading and build xi-core and rust, despite I've installed xi-core already in my system (

Cursor is not visible in leftmost column

I'm not sure if this is a xi-gtk or xi-editor bug, but it might just be a matter of xi-gtk wanting to allocate a bit of padding surrounding the text so there's room to draw the insertion cursor to the left of the leftmost column. There's probably some interaction between this and line numbering.

This may be best achieved through an interface like GtkTextView's gtk_text_view_set_{top,bottom,left,right}_margin functions.

Compilation fails with vala 0.40.0

When compiling the project with Vala 0.40.0 the compilation fails, 0.38.8 works fine.

It gives the following error:

The Meson build system
Version: 0.45.0
Source dir: /tmp/trizen-philip/xi-gtk-git/src/xi-gtk-git
Build dir: /tmp/trizen-philip/xi-gtk-git/src/xi-gtk-git/build
Build type: native build
Project name: xi-gtk
Native C compiler: cc (gcc 7.3.1 "cc (GCC) 7.3.1 20180312")
Appending CFLAGS from environment: '-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt'
Appending LDFLAGS from environment: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Appending CPPFLAGS from environment: '-D_FORTIFY_SOURCE=2'
Native Vala compiler: valac (valac 0.40.0)
Appending LDFLAGS from environment: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Native dependency gtk+-3.0 found: YES 3.22.29
Native dependency json-glib-1.0 found: YES 1.4.2
Native dependency gio-unix-2.0 found: YES 2.56.0
Library m found: YES
Configuring config.h using configuration
Library config found: YES
Native dependency glib-2.0 found: YES 2.56.0
Configuring com.github.eyelash.xi-gtk.service using configuration
Build targets in project: 3
Found ninja-1.8.2 at /usr/bin/ninja
[4/19] Compiling Vala source ../src/Applica...a ../src/Utilities.vala ../src/Window.vala.
FAILED: xi-gtk@exe/src/Application.c xi-gtk@exe/src/Blinker.c xi-gtk@exe/src/CoreConnection.c xi-gtk@exe/src/EditView.c xi-gtk@exe/src/EditViewContainer.c xi-gtk@exe/src/FindBar.c xi-gtk@exe/src/Line.c xi-gtk@exe/src/LineCache.c xi-gtk@exe/src/Notebook.c xi-gtk@exe/src/Style.c xi-gtk@exe/src/StyleMap.c xi-gtk@exe/src/Theme.c xi-gtk@exe/src/Utilities.c xi-gtk@exe/src/Window.c 
valac -C /tmp/trizen-philip/xi-gtk-git/src/xi-gtk-git/config.vapi --pkg gio-unix-2.0 --pkg json-glib-1.0 --pkg gtk+-3.0 --color=always --directory xi-gtk@exe --basedir ../ --gresources=../resources/gresource.xml ../src/Application.vala ../src/Blinker.vala ../src/CoreConnection.vala ../src/EditView.vala ../src/EditViewContainer.vala ../src/FindBar.vala ../src/Line.vala ../src/LineCache.vala ../src/Notebook.vala ../src/Style.vala ../src/StyleMap.vala ../src/Theme.vala ../src/Utilities.vala ../src/Window.vala
../src/EditView.vala:17.1-17.47: error: `Xi.EditView' does not implement interface method `Gtk.Scrollable.get_border'
class EditView: Gtk.DrawingArea, Gtk.Scrollable {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.

Extremely low perfomance and lags with emoji lists

Steps to reproduce:

  1. Create a new document in xi-gtk
  2. Copy content of https://getemoji.com/ page from a web-browser
  3. Paste that content into xi-gtk
  4. Move cursor somewhere in the middle (to the national flags)
  5. Try to move cursor around

Expected behavior: no lags.
Actual behavior: delays up to 200ms per each cursor move in any direction. CPU consumption goes from 3% to 60% for just a cursor movement.

Environment: freshly compiled release version of xi-core, commit 16a00f6 for xi-gtk, Ubuntu 18.04 86_64, CPU Intel(R) Core(TM) i7-7560U CPU @ 2.40GHz

line numbers do in fact work, but syntax highlight doesn't

Subj. Line numbers do work on latest master. (Readme says otherwise)

But I can't get syntax highlight to work. Tried editing files with proper extensions (like "md", "sh", "rs") and bash shebang.

Q: should syntax highlight work, was there a regression?

Build error: Unkown method "find_library" in object [platform:Ubuntu16.04]

When i try to build this, i got an build error:

onehrxn@ubuntu ~/o/e/x/x/build> meson ..
The Meson build system
Version: 0.29.0
Source dir: /home/onehrxn/opensource/editor/xi-editor/xi-gtk
Build dir: /home/onehrxn/opensource/editor/xi-editor/xi-gtk/build
Build type: native build
Build machine cpu family: x86_64
Build machine cpu: x86_64
Project name: xi-gtk
Native vala compiler: valac (unknown 0.30.1)
Native c compiler: cc (gcc 5.4.0-6ubuntu1)
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency gtk+-3.0 found: YES 3.18.9
Native dependency json-glib-1.0 found: YES 1.1.2
Native dependency gio-unix-2.0 found: YES 2.48.2

Meson encountered an error in file meson.build, line 17, column 0:
Unknown method "find_library" in object.

the version of my environment is :

rustc 1.17.0
cargo 0.18.0

Development setup

Hi, I'd like to contribute to this project and since I'm new to Vala I wanted to know your suggested setup. Right now I'm using GNOME Builder but it has trouble understanding the build system and autocompleting.
Thanks

slowness and rendering bugs with long lines

Create a file with long lines, e.g. by running:
$ echo -ne "as\nbas\nasdgsdga\nbhfsd\nas\neq4515g\nafxdvsfvbzxcb xcv\nok\n\n\n" > test.txt; for i in $(seq 15); do paste -d'x' test.txt test.txt > test2.txt; mv test2.txt test.txt; done

Open it in xi-gtk, and all interactions are very slow; in addition, line 7 appears to have multiple overlapping pieces of text rendered.

Incorrect tabulation when line contains non-ascii characters

Reproduction steps:

  1. Open xi-gtk
  2. Type a<tab>a
  3. In a new line, copy and paste a non-ascii character, like æ and press <tab>a

Observed behavior:

In the first line, the indent works as expected, inserting 3 spaces between the a characters.
In the second line, the indent now only adds 2 spaces, rather than 3. This causes a misalignment when creating tables, for example.

a   a
æ  a

Expected behavior:

Both a characters are aligned vertically

a   a
æ   a

Crash in xi_edit_view_real_key_press_event

Any time I press a key I get a crash. Here's the full backtrace:

starting plugins for view-id-1
[New Thread 0x7fffe79b0700 (LWP 238554)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7218472 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
(gdb) bt
#0  0x00007ffff7218472 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#1  0x00007ffff724eeae in gdk_x11_window_get_xid ()
   from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#2  0x00007fffe6fac0ca in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-xim.so
#3  0x00007ffff76da013 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#4  0x0000555555563cc6 in xi_edit_view_real_key_press_event (
    base=0x555555a8f890, event=0x555555aef210)
    at /usr/local/google/home/raph/github/xi-gtk/src/EditView.vala:154
#5  0x00007ffff76fa31a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#6  0x00007ffff648b0f2 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7  0x00007ffff64a53a1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007ffff64a5fbf in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff78469bc in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#10 0x00007ffff786750b in gtk_window_propagate_key_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#11 0x00007ffff786b03b in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#12 0x00007ffff76fa31a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#13 0x00007ffff648b1a4 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff64a53a1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff64a5fbf in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff78469bc in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#17 0x00007ffff76f7339 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#18 0x00007ffff76f935e in gtk_main_do_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#19 0x00007ffff7208405 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#20 0x00007ffff72397d2 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#21 0x00007ffff61b17f7 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff61b1a60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff61b1b0c in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff676d72d in g_application_run ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#25 0x000055555555c0c6 in xi_application_main (args=0x7fffffffded8, 
    args_length1=1)
    at /usr/local/google/home/raph/github/xi-gtk/src/Application.vala:87
#26 0x000055555555c10f in main (argc=1, argv=0x7fffffffded8)
    at /usr/local/google/home/raph/github/xi-gtk/src/Application.vala:85

This is a Debian Testing based machine, running Cinnamon desktop.
The version of libgtk-3-0 is 3.22.24-3

I'll see if I can grab any more debug info.

Add indication when xi-core is not available

Currently, if xi-core isn't available, there is a GTK+ CRITICAL-level message, but no user-facing message.

(xi-gtk:8793): CRITICAL **: CoreConnection.vala:268: Failed to execute child process “xi-core” (No such file or directory)

It would be great if a dialog would pop up and then the editor would exit; as it is I was very confused as to why it wasn't working.

`Utilities.convert_weight` unnecessary

PangoWeight is an integer type, and can take on any value between 100 and 1000; we shouldn't convert integers into "enumeration" values, as these values are just defined as integers anyway, so the mapping in Utilities.convert_weight is incomplete and unnecessary.

All the code in Pango that works with treats them as integers without assuming them to only fall on the enumerated values.

Problem with launching from build dir

I have the following problem:

$ pwd
/home/florian/code/misc/xi-gtk/build
$ ./xi-gtk
# this works
$ cat ~/bin/xi-gtk 
#!/bin/bash
set -x
cd /home/florian/code/misc/xi-gtk/build/
exec ./xi-gtk
$ ~/bin/xi-gtk
# works

but if I run this wrapper (or a symlink) with dmenu, I get the same result as if xi-core is not in ~/.cargo/bin/

So I guess this is a dmenu problem, and I can accept that it's meant to be installed because it's not just a single binary, but I could easily enough fix that by running ninja install as a user with a custom prefix. If that's possible, could that be added to the instructions?

Most recent clone did not find Pkg-config

Right when I try meson .. in the build/ folder, it shows everything "ok" except for lacking pkg-config.

What can we do about it?

On Arch Linux (using rustup, having installed xi-core)

Syntax Highlighting Failure

I would like to point out that there are no clear instructions on how to get syntax highlighting working.

I have tried to utilize the make file by redirecting it to the folder of xi and it seems to have been installed but some failure is reported in the logs (I don't have those messages around right now to report them)

Any plans to make it easy for users of popular distributions to install syntax highlighting?

Personally, I am on Ubuntu 18.10.

I would love to use xi as it's freedom respecting and super responsive.

Thanks a lot.

Support DND

At some point the EditView should learn to move selections with the mouse and exchange dragged selections with other programs.

Regression when compiling xi-gtk

I ran into this trying to build xi-gtk. Maybe there's something wrong in my environment but xi-gtk builds from a few commits ago and not on master:

charles#localhost#build (ea13c79...) 
$ ninja
[1/16] Compiling Vala source .....lities.vala ../src/Window.vala.
FAILED: valac -C --debug --pkg gio-unix-2.0 --pkg json-glib-1.0 --pkg gtk+-3.0 --directory xi-gtk@exe --basedir ../ --gresources=../re
sources/gresource.xml ../src/Application.vala ../src/Blinker.vala ../src/CoreConnection.vala ../src/EditView.vala ../src/EditViewConta
iner.vala ../src/FindBar.vala ../src/Line.vala ../src/LineCache.vala ../src/Notebook.vala ../src/Style.vala ../src/StyleMap.vala ../sr
c/Theme.vala ../src/Utilities.vala ../src/Window.vala
../src/EditView.vala:174.7-174.20: error: The name `focus_on_click' does not exist in the context of `Xi.EditView.button_press_event'
                if (focus_on_click && !has_focus) {
                                    ^^^^^^^^^^^^^^
                                    Compilation failed: 1 error(s), 0 warning(s)
                                    ninja: build stopped: subcommand failed.

charles#localhost#build (ea13c79...) 
$ git co HEAD~
Previous HEAD position was ea13c79... require GTK 3.20
HEAD is now at f4af683... don't use Pango to draw the backgrounds

charles#localhost#build (f4af683...) 
$ ninja
[1/1] Regenerating build files.
Warning: You are using 'ANSI_X3.4-1968' which is not a Unicode-compatible locale.
You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents.
Please switch to a UTF-8 locale for your platform.
The Meson build system
Version: 0.43.0
Source dir: /home/charles/code/xi-editor/xi-gtk
Build dir: /home/charles/code/xi-editor/xi-gtk/build
Build type: native build
Project name: xi-gtk
Native C compiler: cc (gcc 5.4.0)
Native Vala compiler: valac (valac 0.30.1)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Library m found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency glib-2.0 found: YES 2.54.0
Configuring com.github.eyelash.xi-gtk.service using configuration
Build targets in project: 3
Found ninja-1.5.1 at /usr/bin/ninja
[4/4] Linking target xi-gtk.

Let me know if you want me to test something!

Fails to open a document with xi-core 0.2

I am using xi-gtk at HEAD and xi-editor's 0.2 release. I see the following at launch:

Error Error: Unknown tab method 'client_started' decoding RPC request client_started
Error Error: Unknown tab method 'set_theme' decoding RPC request set_theme
Error Error: Unknown tab method 'new_view' decoding RPC request new_view
(xi-gtk:27212): Json-CRITICAL **: 10:54:05.414: json_node_get_string: assertion 'JSON_NODE_IS_VALID (node)' failed
** (xi-gtk:27212): CRITICAL **: 10:54:05.414: xi_notebook_add_edit_view: assertion 'view_id != NULL' failed

auto-scroll

When selecting text with the mouse the view should automatically scroll if the mouse is near the top or the bottom.

xi-gtk freezes when opening files whose names are invalid utf8, and have invalid utf8

How to reproduce:

  1. Open xi-gtk
  2. Open a file whose filename is invalid utf8, which contains invalid utf8, so xi-core exits.
    in my case, the filename is: (hex) 20 ed 96 4f 56 (or escaped): " \xed\x96OV"
    the file is a corrupt stack trace that contains some non-utf8 gibberish, but any binary file should work.
  3. After xi-core exits, xi-gtk enters an infinite loop printing error messages to the console

Stdout/stderr:

starting plugins for view-id-1
starting plugins for view-id-3
xi-core exited with error:
Io(Error { repr: Custom(Custom { kind: InvalidData, error: StringError("stream did not contain valid UTF-8") }) })

(xi-gtk:8440): Json-CRITICAL **: json_parser_load_from_data: assertion 'data != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_node_get_object: assertion 'JSON_NODE_IS_VALID (node)' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_has_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_get_string_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_get_object_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_parser_load_from_data: assertion 'data != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_node_get_object: assertion 'JSON_NODE_IS_VALID (node)' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_has_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_get_string_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_get_object_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_parser_load_from_data: assertion 'data != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_node_get_object: assertion 'JSON_NODE_IS_VALID (node)' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_has_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_get_string_member: assertion 'object != NULL' failed

(xi-gtk:8440): Json-CRITICAL **: json_object_get_object_member: assertion 'object != NULL' failed

The spam of Json-CRITICAL errors continues forever. The only solution is to kill xi-gtk.

Can not scroll horizontally

I can not scroll horizontally when opening a file with long sentences. Horizontal scrollbar on the bottom doesn't appear unlike vertical scrollbar, scrolling with left/right key and trackpad also didn't work. Thanks.

2018-07-07_15 16 08

Can not drag selected text

when I have text selected and drag using bouse I'm getting following errors in console

[2019-07-01][23:57:31][xi_core_lib::view][WARN] Usage of drag is deprecated; use gesture instead

Right mouse click is also not supported ( so can't copy

Add "how to change background color" to README

First of all, thank you for this amazing project, it's very useful for working with large files like in Data Science.

How can I adjust the background and foreground(text) colors (can be a total hack for now)?
I've tried several things but could not get it to work.
It would be useful if this was added to the README.
I easily get headaches from the black-and-white contrast so custom colors would be really useful for me.

save the window size

The window size should be saved when you close the application and restored when you launch it again.

Cannot find xi-core on Ubuntu

The installation steps proceeded without an error, but when it comes to launching xi-gtk:

mlncn@oryx:build [master]$ echo $PATH
/home/mlncn/.rbenv/shims:/home/mlncn/.rbenv/bin:/home/mlncn/.nvm/versions/node/v8.4.0/bin:/home/mlncn/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games/home/mlncn/.cargo/bin
mlncn@oryx:build [master]$ ./xi-gtk

** (xi-gtk:17784): CRITICAL **: 23:50:46.010: CoreConnection.vala:287: Failed to execute child process “xi-core” (No such file or directory)

(xi-gtk:17784): GLib-GIO-CRITICAL **: 23:50:46.011: g_subprocess_get_stdin_pipe: assertion 'G_IS_SUBPROCESS (subprocess)' failed

(xi-gtk:17784): Json-CRITICAL **: 23:50:46.011: json_generator_to_stream: assertion 'G_IS_OUTPUT_STREAM (stream)' failed

(xi-gtk:17784): GLib-GIO-CRITICAL **: 23:50:46.011: g_output_stream_write: assertion 'G_IS_OUTPUT_STREAM (stream)' failed

(xi-gtk:17784): GLib-GIO-CRITICAL **: 23:50:46.011: g_output_stream_flush: assertion 'G_IS_OUTPUT_STREAM (stream)' failed

assertion failure after opening xi-gtk and hitting enter

This is with the latest git versions of xi-editor and xi-gtk.

$ gdb ./xi-gtk --g-fatal-warnings
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./xi-gtk...done.
Starting program: xi-gtk/build/xi-gtk --g-fatal-warnings
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

** (xi-gtk:8761): CRITICAL **: xi_line_set_cursors: assertion 'json_cursors != NULL' failed

Thread 1 "xi-gtk" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff61a3011 in ?? () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0  0x00007ffff61a3011 in  () at /usr/lib/libglib-2.0.so.0
#1  0x00007ffff61a441d in g_logv () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff61a457f in g_log () at /usr/lib/libglib-2.0.so.0
#3  0x000000000040dddd in xi_line_set_cursors (self=, json_cursors=0x0) at xi-gtk/Line.vala:27
#4  0x000000000041098a in xi_lines_cache_update (self=, update=0x76aaa0) at xi-gtk/LinesCache.vala:90
#5  0x000000000040c372 in xi_edit_view_update (self=0x68e430, view_id=0x885900 "view-id-1", update=0x76aaa0) at xi-gtk/EditView.vala:223
#6  0x000000000040a433 in _xi_edit_view_update_xi_core_connection_update_received (_sender=, view_id=0x885900 "view-id-1", update=0x76aaa0, self=0x68e430)
    at xi-gtk/EditView.vala:61
#7  0x0000000000408d5a in g_cclosure_user_marshal_VOID__STRING_BOXED (closure=0x734730, return_value=0x0, n_param_values=3, param_values=0x7fffffffd920, invocation_hint=0x7fffffffd8a0, marshal_data=0x0) at xi-gtk/CoreConnection.vala:17
#8  0x00007ffff6475f75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#9  0x00007ffff6487f82 in  () at /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff6490bcc in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff6490faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#12 0x0000000000407374 in xi_core_connection_receive (self=) at xi-gtk/CoreConnection.vala:62
#13 0x00000000004088de in _xi_core_connection_receive_gpollable_source_func (pollable_stream=0x712f40, self=0x713120) at CoreConnection.c:1263
#14 0x00007ffff619d45a in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#15 0x00007ffff619d810 in  () at /usr/lib/libglib-2.0.so.0
#16 0x00007ffff619d8bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#17 0x00007ffff675752d in g_application_run () at /usr/lib/libgio-2.0.so.0
#18 0x0000000000406a20 in xi_application_main (args=0x7fffffffe148, args_length1=2) at xi-gtk/Application.vala:87
#19 0x0000000000406a69 in main (argc=2, argv=0x7fffffffe148) at xi-gtk/Application.vala:85
(gdb) 

Can't unindent a chunk of code

When I select a chunk of code, I can press tab and it adds a tab to the beginning of all of the selected lines. I like this feature, but there's no way to do the opposite. Gedit does this as well, and also SHIFT + TAB removes a tab from the beginning of all the selected lines. I think it would be useful if xi-gtk did the same thing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.