Skip to content

Commit

Permalink
v0.4.2 backportapalooza (#303)
Browse files Browse the repository at this point in the history
* fix(links): ignore the case when look-up for an anchor (#256)

* Fix exclude for `manual_test_data` (#257)

* docs(repology): Exclude unsupported package repos (#271)

* fix(table): Fix crash when rendering headerless table (#279)

* docs(readme): Improve installation docs (#280)

* fix: add check to render_selection, so it does not return small boxes. (#288)

Signed-off-by: konrad <[email protected]>

* chore(deps): Update `smithay-client-toolkit` from v0.16.0 -> v0.16.1 (#298)

* chore: Dont check for typos on test data

---------

Signed-off-by: konrad <[email protected]>
Co-authored-by: Anas <[email protected]>
Co-authored-by: kokoISnoTarget <[email protected]>
  • Loading branch information
3 people authored Apr 6, 2024
1 parent 58e4a56 commit 744815f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 16 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rust-version = "1.72.1"
exclude = [
"/ci/*",
"/.github/*",
"/tests/manual_test_data/*",
"/assets/manual_test_data/*",
]
keywords = ["markdown", "viewer", "gpu"]

Expand Down
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,26 @@ Except 9 times out of 10 you need an entire web browser to quickly open a file..
Introducing **Inlyne**, a GPU powered yet browserless tool to help you quickly
view markdown files in the blink of an eye 👀.

## Install
## Installation

To install just use `cargo install inlyne`, almost everything comes pre-bundled (see [Dependencies](#dependencies)).
Alternatively you can install through various package managers.
`inlyne` is already present in a handful of different package repos.
Installation should be mostly painless as _most_ things come pre-bundled.

[![Packaging status](https://repology.org/badge/vertical-allrepos/inlyne.svg)](https://repology.org/project/inlyne/versions)
[![Packaging status](https://repology.org/badge/vertical-allrepos/inlyne.svg?exclude_unsupported=1)](https://repology.org/project/inlyne/versions)

### Dependencies
### Building from Source

The `fontconfig` package from your distribution needs to be installed. See https://github.com/yeslogic/fontconfig-rs#dependencies.
There are a small handful of dependencies needed to build `inlyne` from source.
Namely

1. `cargo` with a somewhat recent Rust toolchain
[(the relevant docs)](https://www.rust-lang.org/learn/get-started)
2. A C-compiler
3. (On Linux) Development libraries for `fontconfig`, `xkbcommon`, and `wayland`
(when the `wayland` feature flag is set)

For instance on Ubuntu `gcc` covers 2. and `libfontconfig-dev`,
`libxkbcommon-dev` and `libwayland-dev` would cover 3.

## Features

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ impl Inlyne {
}
}
} else if let Some(anchor_pos) =
self.renderer.positioner.anchors.get(link)
self.renderer.positioner.anchors.get(&link.to_lowercase())
{
self.renderer.set_scroll_y(*anchor_pos);
self.window.request_redraw();
Expand Down
13 changes: 9 additions & 4 deletions src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,15 @@ impl Renderer {
}
}
}
let last_header_node = layout.headers.last().unwrap();
let y = last_header_node.location.y
+ last_header_node.size.height
+ TABLE_ROW_GAP / 2.;
let y = layout
.headers
.last()
.map(|last_header_node| {
last_header_node.location.y
+ last_header_node.size.height
+ TABLE_ROW_GAP / 2.0
})
.unwrap_or(0.0);
let x = layout
.headers
.last()
Expand Down
4 changes: 4 additions & 0 deletions src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,10 @@ impl TextBox {
select_end.0 - screen_position.0,
select_end.1 - screen_position.1,
) {
if start_cursor.index == end_cursor.index {
return (vec![], String::new());
}

let mut y = screen_position.1;
for line in buffer.layout_runs() {
let line_contains =
Expand Down
2 changes: 2 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[files]
extend-exclude = ["assets/manual_test_data"]

0 comments on commit 744815f

Please sign in to comment.