2
0
Fork 0
mirror of https://github.com/rust-lang/rust-analyzer synced 2025-02-14 21:18:40 +00:00
rust-analyzer/crates
Johannes Altmanninger 94a4c3abaa Clamp Position::character to line length
LSP says about Position::character

> If the character value is greater than the line length it defaults back to the line length.

but from_proto::offset() doesn't implement this.

A client might for example request code actions for a whole line by sending
Position::character=99999.  I don't think there is ever a reason (besides laziness) why the
client can't specify the line length instead but I guess we should not crash but follow protocol.

Technically it should be a warning, not an error but warning is not shown by default so keep
it at error I guess.

Fixes 
2024-10-18 15:07:13 +02:00
..
base-db chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
cfg Gate #[test] expansion under cfg(test). 2024-09-30 00:12:45 +03:00
hir Auto merge of - davidbarsky:davidbarsky/push-lmntvwvznyyx, r=davidbarsky 2024-10-04 17:59:02 +00:00
hir-def chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
hir-expand chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
hir-ty internal: Add more trivially Sized types to is_sized check 2024-10-18 12:41:14 +02:00
ide Auto merge of - roife:fix-issue-17427, r=Veykril 2024-10-14 14:51:57 +00:00
ide-assists Merge from rust-lang/rust 2024-10-08 14:25:39 +03:00
ide-completion Fix: Handle block exprs as modules when finding their parents 2024-10-01 14:05:15 +09:00
ide-db chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
ide-diagnostics fix: autofix for missing wrapped unit in return expr 2024-10-15 14:23:58 +08:00
ide-ssr chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
intern Merge from rust-lang/rust 2024-09-25 09:00:53 +03:00
limit Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
load-cargo Gate #[test] expansion under cfg(test). 2024-09-30 00:12:45 +03:00
mbe Add missing rustc_private 2024-09-25 10:56:37 +03:00
parser Bump rustc crates 2024-10-17 13:11:12 +02:00
paths Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
proc-macro-api Properly set the working directory for proc-macro execution 2024-09-11 12:23:12 +02:00
proc-macro-srv fix: Fix TokenStream::to_string implementation dropping quotation marks 2024-08-29 08:45:35 +02:00
proc-macro-srv-cli Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
profile Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
project-model fix: Fix CI running analysis-stats incorrectly against the standard libraries 2024-10-18 12:34:55 +02:00
ra-salsa chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
rust-analyzer Clamp Position::character to line length 2024-10-18 15:07:13 +02:00
span chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
stdx Use crossbeam-channel from the workspace 2024-08-09 23:48:03 +02:00
syntax Rename object_safety to dyn_compatibility 2024-09-29 07:26:45 -04:00
syntax-bridge When glueing together tokens from macros, merge their spans 2024-09-29 22:58:15 +03:00
test-fixture Always cache macro expansions' root node in Semantics 2024-09-17 00:19:39 +03:00
test-utils fix: Always explicitly set trait ref self types when lowering 2024-09-06 14:06:41 +02:00
text-edit Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
toolchain Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
tt Support the ${concat(...)} metavariable expression 2024-09-19 22:19:12 +03:00
vfs Rename object_safety to dyn_compatibility 2024-09-29 07:26:45 -04:00
vfs-notify Auto merge of - mo8it:flycheck, r=Veykril 2024-08-12 09:27:47 +00:00