Skip to content

Commit 8567aa7

Browse files
authored
Merge pull request #59 from webbertakken/allow-using-tab
feat(collider): allow tab completion for files
2 parents 87f3943 + 1807813 commit 8567aa7

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.cargo/config.toml
22
.vscode
3+
.idea
34
**/*.rs.bk
45
**/target
56
Cargo.lock

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
### Improved
55

66
- The `collider` (example) editor now snaps to half-pixels.
7+
- The `collider` (example) editor now handles relative paths that begin with `./` or `.\`, which was especially vexing to powershell users. Contributed by [@webbertakken](https://github.com/webbertakken) in [#59].
8+
9+
[#59]: https://github.com/CleanCut/rusty_engine/pull/59
710

811
## [5.2.0] - 2022-09-13
912

examples/collider.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ fn main() {
5151
std::process::exit(1);
5252
}
5353

54+
// Remove "./" or ".\" from the start of the argument if necessary.
55+
let mut path: PathBuf = args[0]
56+
.as_str()
57+
.trim_start_matches("./")
58+
.trim_start_matches(r".\")
59+
.into();
60+
5461
// If the user passed in `assets/something...` then we need to strip `assets/` (the asset loader will prepend `assets/`)
55-
let mut path = PathBuf::from(args[0].clone());
5662
if path.starts_with("assets") {
5763
path = path.strip_prefix("assets").unwrap().to_path_buf();
5864
}

0 commit comments

Comments
 (0)