Home / Function/ move_to() — tailwindcss Function Reference

move_to() — tailwindcss Function Reference

Architecture documentation for the move_to() function in cursor.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  eacebf08_7f52_121a_f1b0_aaad12569230["move_to()"]
  73eb6ad2_0d98_d584_bdd4_3606fa10de7b["new()"]
  73eb6ad2_0d98_d584_bdd4_3606fa10de7b -->|calls| eacebf08_7f52_121a_f1b0_aaad12569230
  9ec35898_57b1_8a60_b49f_7eb7a0096aa4["advance_by()"]
  9ec35898_57b1_8a60_b49f_7eb7a0096aa4 -->|calls| eacebf08_7f52_121a_f1b0_aaad12569230
  91d6a0dd_e315_a957_62e1_9fe3920d5d79["next()"]
  91d6a0dd_e315_a957_62e1_9fe3920d5d79 -->|calls| eacebf08_7f52_121a_f1b0_aaad12569230
  877a213e_88d9_c372_5e99_15a0654fc974["extract_sub_candidates()"]
  877a213e_88d9_c372_5e99_15a0654fc974 -->|calls| eacebf08_7f52_121a_f1b0_aaad12569230
  ffc5693d_f72e_53c2_3a9f_e796ab1c4070["skip_indented_block()"]
  ffc5693d_f72e_53c2_3a9f_e796ab1c4070 -->|calls| eacebf08_7f52_121a_f1b0_aaad12569230
  style eacebf08_7f52_121a_f1b0_aaad12569230 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/cursor.rs lines 72–83

    pub fn move_to(&mut self, pos: usize) {
        let len = self.input.len();
        let pos = pos.clamp(0, len);

        self.pos = pos;
        self.at_start = pos == 0;
        self.at_end = pos + 1 >= len;

        self.prev = *self.input.get(pos.wrapping_sub(1)).unwrap_or(&0x00u8);
        self.curr = *self.input.get(pos).unwrap_or(&0x00u8);
        self.next = *self.input.get(pos.saturating_add(1)).unwrap_or(&0x00u8);
    }

Domain

Subdomains

Frequently Asked Questions

What does move_to() do?
move_to() is a function in the tailwindcss codebase.
What calls move_to()?
move_to() is called by 5 function(s): advance_by, extract_sub_candidates, new, next, skip_indented_block.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free